From 34db515acb4f38b8478706c5962cc0038c515ce8 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Tue, 6 Oct 2015 17:13:40 +0200 Subject: Reviewed some comments and WritePNG() --- src/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index b8e8bc1a..aac461cd 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 -- cgit v1.2.3 From b804f381504ce8dcc6e67f0b272f7dc2a81ffb2d Mon Sep 17 00:00:00 2001 From: raysan5 Date: Sat, 2 Jan 2016 10:41:37 +0100 Subject: Small code tweaks --- src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index aac461cd..974088f3 100644 --- a/src/utils.c +++ b/src/utils.c @@ -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); } -- cgit v1.2.3