SDL_SavePNG - Man Page
Save a surface to a file in PNG format.
Synopsis
#include <SDL3/SDL_surface.h> bool SDL_SavePNG(SDL_Surface *surface, const char *file);
Function Parameters
- surface
the SDL_Surface structure containing the image to be saved.
- file
a file to save to.
Return Value
Returns true on success or false on failure; call SDL_GetError() for more information.
Thread Safety
This function can be called on different threads with different surfaces.
Availability
This function is available since SDL 3.4.0.
See Also
Referenced By
SDL_LoadPNG(3), SDL_SavePNG_IO(3).
SDL 3.3.2 Simple Directmedia Layer SDL3 FUNCTIONS