diff options
| author | Ray San <[email protected]> | 2017-12-15 13:44:31 +0100 |
|---|---|---|
| committer | Ray San <[email protected]> | 2017-12-15 13:44:31 +0100 |
| commit | 53ad53d05127ac083f7439c5c2e1c2ab5e73e1c0 (patch) | |
| tree | 492c374df9119066271b8e9d84f27901479d8ec9 /src/textures.c | |
| parent | bcdde6c65af3eee20ce3a142eec800dece759c17 (diff) | |
| download | raylib-53ad53d05127ac083f7439c5c2e1c2ab5e73e1c0.tar.gz raylib-53ad53d05127ac083f7439c5c2e1c2ab5e73e1c0.zip | |
Manually review previous PR
Diffstat (limited to 'src/textures.c')
| -rw-r--r-- | src/textures.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/textures.c b/src/textures.c index 55749118..01b8e4fc 100644 --- a/src/textures.c +++ b/src/textures.c @@ -554,13 +554,12 @@ void UpdateTexture(Texture2D texture, const void *pixels) // Save image to a PNG file void SaveImageAs(const char* fileName, Image image) { -#if (defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)) && defined(SUPPORT_SAVE_PNG) - unsigned char* imgData = (unsigned char*)GetImageData(image); // this works since Color is just a container for the RGBA values + // NOTE: Getting Color array as RGBA unsigned char values + unsigned char* imgData = (unsigned char*)GetImageData(image); SavePNG(fileName, imgData, image.width, image.height, 4); free(imgData); TraceLog(LOG_INFO, "Image saved: %s", fileName); -#endif } // Convert image data to desired format |
