IMG_SavePNG(3)
πΈ NAME πΈ
IMG_SavePNG(3) β the lil function that saves an SDL_Surface into a PNG image file. Sheβs from the SDL_image3 FUNCTIONS corner of the manual, and sheβs here to help you save your pixels, bestie. π
β¨ SYNOPSIS β¨
#include <SDL3_image/SDL_image.h>
bool IMG_SavePNG(SDL_Surface *surface, const char *file);
π DESCRIPTION π
okay so real talk: if the file already exists, it will be overwritten. Thatβs the whole vibe. No cap. π
π¦ FUNCTION PARAMETERS π¦
surfaceβ the SDL surface to save. This is the pixel situation youβre sending off into the world. π«Άfileβ the path on the filesystem to write the new file to. Literally where your PNG is gonna live. π‘β¨
β RETURN VALUE β
Returns true on success or false on failure. If it fails, call SDL_GetError() for more information β sheβll tell you what went wrong, iykyk. ππ
π AVAILABILITY π
This function is available since SDL_image 3.0.0. Iconic behavior from day one, periodt. π
π SEE ALSO π
IMG_SavePNG_IO(3)β the related function, go give her a read too. π§ββοΈ
This cute lil page is from SDL_image 3.4.4 β mwah, go save some PNGs bestie πππ¦
π¦ where this page comes from
- ubuntu stonking: libsdl3-image-doc 3.4.4+ds-2 Β· zlib/libpng AND HPND-like AND zlib-like-permissive
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms