SDL_SavePNG_IO(3)
πΎ SDL_SavePNG_IO(3) πΎ
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, and today's main character is SDL_SavePNG_IO π
β¨ 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β theSDL_Surfacestructure holding the image you wanna save πΌοΈdstβ a data stream to save to πcloseioβ iftrue, it callsSDL_CloseIO()ondstbefore returning, even in the case of an error π like it's closing that door no matter what happens next, fr fr
β¨ RETURN VALUE β¨
Returns true on success or false on failure π« and if it's giving failure, call SDL_GetError() for more information π
β¨ THREAD SAFETY β¨
This function can be called on different threads with different surfaces π§β¨ so yes, you can absolutely parallelize this, just keep the surfaces separate, iykyk π
β¨ AVAILABILITY β¨
This function is available since SDL 3.4.0 π
β¨ SEE ALSO β¨
bestie reminder: dst has to be seekable, that's not a suggestion, that's the vibe check πΈ
and that's the whole page, no cap π this one came to you from Simple Directmedia Layer, version SDL 3.4.18 π¦ mwah, go save some PNGs, you ate π β¨
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms