mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-17 15:21:44 +00:00
added proper define checks for png-save if it's disabled
This commit is contained in:
@@ -554,7 +554,7 @@ 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)
|
||||
#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
|
||||
SavePNG(fileName, imgData, image.width, image.height, 4);
|
||||
free(imgData);
|
||||
|
Reference in New Issue
Block a user