summaryrefslogtreecommitdiffhomepage
path: root/src/utils.c
diff options
context:
space:
mode:
authorvictorfisac <[email protected]>2016-02-26 14:32:30 +0100
committervictorfisac <[email protected]>2016-02-26 14:32:30 +0100
commitce56fcb1eda06385b88c1a906f0968d742ff8130 (patch)
tree4c82fa8ce61db1ae4af3ab1e174dd8c7d5918919 /src/utils.c
parentf582ab06add085594f2579ee6e7d625212abd204 (diff)
parent75a73d94171051037fcf670852877977d9251520 (diff)
downloadraylib-ce56fcb1eda06385b88c1a906f0968d742ff8130.tar.gz
raylib-ce56fcb1eda06385b88c1a906f0968d742ff8130.zip
Merge remote-tracking branch 'refs/remotes/raysan5/master'
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);
}