diff --git a/src/raylib.h b/src/raylib.h index ee0d8ccc..aa55b776 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -849,7 +849,7 @@ RLAPI void UnloadRenderTexture(RenderTexture2D target); RLAPI Color *GetImageData(Image image); // Get pixel data from image as a Color struct array RLAPI Image GetTextureData(Texture2D texture); // Get pixel data from GPU texture and return an Image RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data -RLAPI void SaveImageAs(Image image, const char *fileName); // Save image to a PNG file +RLAPI void SaveImageAs(const char *fileName, Image image); // Save image to a PNG file // Image manipulation functions RLAPI void ImageToPOT(Image *image, Color fillColor); // Convert image to POT (power-of-two) diff --git a/src/textures.c b/src/textures.c index f1fcb12c..34c7453a 100644 --- a/src/textures.c +++ b/src/textures.c @@ -554,7 +554,7 @@ void UpdateTexture(Texture2D texture, const void *pixels) } // Save image to a PNG file -void SaveImageAs(Image image, const char *fileName) +void SaveImageAs(const char* fileName, Image image) { #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) unsigned char* imgData = (unsigned char*)GetImageData(image); // this works since Color is just a container for the RGBA values