IMG_SaveAVIF_IO(3)
okay so welcome to IMG_SaveAVIF_IO(3), bestie β this is the SDL_image3 FUNCTIONS manual, and todayβs main character is saving an SDL_Surface into AVIF image data via an SDL_IOStream β¨
πΈ NAME πΈ
IMG_SaveAVIF_IO β save an SDL_Surface into AVIF image data, via an SDL_IOStream. Thatβs the whole vibe π
π SYNOPSIS π
#include <SDL3_image/SDL_image.h>
bool IMG_SaveAVIF_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio, int quality);
π¦ DESCRIPTION π¦
If your whole goal is βsave to a filename,β bestie, skip this one and use IMG_SaveAVIF() instead. This function is the SDL_IOStream route, iykyk.
β οΈ okay but listen: ifcloseioistrue, thendstwill be closed before returning β whether this function succeeds or not. Itβs giving cleanup on aisle every outcome π
π FUNCTION PARAMETERS π
surfaceβ theSDL_Surfaceyou want to save. The actual art, the moment, the material πdstβ theSDL_IOStreamwhere the image data gets saved. This is the destination bestie.closeioβtruemeans close/free theSDL_IOStreambefore returning;falsemeans leave it open. Choose wisely, no cap.qualityβ the desired quality, ranging between0(lowest) and100(highest). Lowkey0is rough, highkey100is the slay end of the scale β¨
π RETURN VALUE π
Returns true on success or false on failure; call SDL_GetError() for more information. So if itβs giving failure, go ask SDL_GetError() what happened π«Ά
β AVAILABILITY β
This function is available since SDL_image 3.0.0. Iconic, honestly.
π SEE ALSO π
IMG_SaveAVIF(3)β the filename-saving sibling, if thatβs more your speed π
signed off with π from the footer: source/version is SDL_image 3.4.4, and the date isnβt listed on this page, so weβre not inventing one β periodt π
π¦ 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