IMG_SaveJPG(3)
π NAME π
okay so bestie, welcome to the IMG_SaveJPG(3) page, part of SDL_image3 FUNCTIONS β¨ β this one is all about saving an SDL_Surface into a JPEG image file. iconic behavior, honestly π
β¨ SYNOPSIS β¨
#include <SDL3_image/SDL_image.h>
bool IMG_SaveJPG(SDL_Surface *surface, const char *file, int quality);
πΈ DESCRIPTION πΈ
if the file already exists, it will be overwritten. no cap. so yeah, bestie, keep that in mind before you point it at something precious π
π¦ FUNCTION PARAMETERS π¦
surfaceβ theSDL_Surfaceyou want to save. that's the main character right there πfileβ path on the filesystem to write new file to. yes, the actual destination vibe check πqualityβ the quality bands are:[0; 33]is Lowest quality,[34; 66]is Middle quality,[67; 100]is Highest quality. pick your fighter π
π«Ά RETURN VALUE π«Ά
Returns true on success or false on failure; call SDL_GetError() for more information. so if it goes wrong, don't just spiral β go ask SDL_GetError() what happened π₯
β AVAILABILITY β
This function is available since SDL_image 3.0.0. periodt π
π§ SEE ALSO π§
mwah π that's the whole page, brought to you by SDL_image, version 3.4.4 β go save some JPEGs, 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