SDL_SavePNG_IO(3)
| SDL_SavePNG_IO(3) | SDL3 FUNCTIONS | SDL_SavePNG_IO(3) |
NAME
SDL_SavePNG_IO - Save a surface to a seekable SDL data stream in PNG format.
SYNOPSIS
#include <SDL3/SDL_surface.h>
bool SDL_SavePNG_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio);
FUNCTION PARAMETERS
- surface
- the SDL_Surface structure containing the image to be saved.
- dst
- a data stream to save to.
- closeio
- if true, calls SDL_CloseIO() on dst before returning, even in the case of an error.
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
| SDL 3.4.0 | Simple Directmedia Layer |
