|
|
@ -416,7 +416,13 @@ bool ExportImage(Image image, const char *fileName) |
|
|
|
} |
|
|
|
|
|
|
|
#if defined(SUPPORT_FILEFORMAT_PNG) |
|
|
|
if (IsFileExtension(fileName, ".png")) success = stbi_write_png(fileName, image.width, image.height, channels, imgData, image.width*channels); |
|
|
|
if (IsFileExtension(fileName, ".png")) |
|
|
|
{ |
|
|
|
int dataSize = 0; |
|
|
|
unsigned char *fileData = stbi_write_png_to_mem((const unsigned char *)imgData, image.width*channels, image.width, image.height, channels, &dataSize); |
|
|
|
success = SaveFileData(fileName, fileData, dataSize); |
|
|
|
RL_FREE(fileData); |
|
|
|
} |
|
|
|
#else |
|
|
|
if (false) {} |
|
|
|
#endif |
|
|
|