aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorRay <raysan5@gmail.com>2016-02-20 01:09:47 +0100
committerRay <raysan5@gmail.com>2016-02-20 01:09:47 +0100
commit4b6e6d4dd45fc3a47b82af7eeb60871140a7eccf (patch)
treed9ee679c3b0bc5d4a20b31930994deb0e4c37948 /src/utils.c
parentf582ab06add085594f2579ee6e7d625212abd204 (diff)
parent954ced21a42eb489ad382b4c00406a28778fee41 (diff)
downloadraylib-4b6e6d4dd45fc3a47b82af7eeb60871140a7eccf.tar.gz
raylib-4b6e6d4dd45fc3a47b82af7eeb60871140a7eccf.zip
Merge pull request #83 from raysan5/develop
Develop branch integration
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils.c b/src/utils.c
index b8e8bc1a..974088f3 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -160,9 +160,9 @@ void WriteBitmap(const char *fileName, unsigned char *imgData, int width, int he
// Creates a PNG image file from an array of pixel data
// NOTE: Uses stb_image_write
-void WritePNG(const char *fileName, unsigned char *imgData, int width, int height)
+void WritePNG(const char *fileName, unsigned char *imgData, int width, int height, int compSize)
{
- stbi_write_png(fileName, width, height, 4, imgData, width*4); // It WORKS!!!
+ stbi_write_png(fileName, width, height, compSize, imgData, width*compSize);
}
#endif
@@ -267,7 +267,7 @@ void RecordMalloc(int mallocType, int mallocSize, const char *msg)
const char *GetExtension(const char *fileName)
{
const char *dot = strrchr(fileName, '.');
- if(!dot || dot == fileName) return "";
+ if (!dot || dot == fileName) return "";
return (dot + 1);
}