IMG_SaveAVIFAnimation_IO(3)
π IMG_SaveAVIFAnimation_IO π
okay bestie, sit down, hydrate, and let me tell you about IMG_SaveAVIFAnimation_IO from the SDL_image3 functions. it's a manual page (section 3, library functions, iykyk) and it does exactly one iconic thing: it saves your animation as an AVIF, straight into an SDL_IOStream. no cap. π
β¨ NAME β¨
IMG_SaveAVIFAnimation_IO β bestie. this saves an animation in AVIF format to an SDL_IOStream. that's the whole job. she's focused, she's employed, she slays. π
β¨ SYNOPSIS β¨
#include <SDL3_image/SDL_image.h>
bool IMG_SaveAVIFAnimation_IO(IMG_Animation *anim, SDL_IOStream *dst, bool closeio, int quality);
look at her. four little arguments. so demure, so mindful. π¦
β¨ DESCRIPTION β¨
so here's the tea, and it's actually kind of important: if closeio is true, then dst will be closed before returning β and I mean whether this function succeeds or not. success? closed. failure? still closed. she does not play about closing. π«Ά
β¨ FUNCTION PARAMETERS β¨
animβ the animation you wanna save. your little baby. your masterpiece. πΈdstβ anSDL_IOStreamfrom which data will be written to. yes, the wording is a lil quirky but that's the manual talking, and we respect her. β¨closeioβtrueto close/free theSDL_IOStreambefore returning,falseto leave it open. it's giving "am I your problem after this or not". πqualityβ the desired quality, ranging between0(lowest) and100(highest). pick your vibe:100for main character energy,0for... a choice. π
β¨ RETURN VALUE β¨
returns true on success or false on failure. and if it fails, do NOT just sit there guessing β call SDL_GetError() for more information. she will tell you what went wrong, fr fr. π
β¨ AVAILABILITY β¨
this function is available since SDL_image 3.4.0. so if you're on something older, no AVIF animation for you, bestie. sorry. π
β¨ SEE ALSO β¨
the whole friend group, all linked up:
IMG_SaveAnimation(3)IMG_SaveAnimationTyped_IO(3)IMG_SaveANIAnimation_IO(3)IMG_SaveAPNGAnimation_IO(3)IMG_SaveGIFAnimation_IO(3)IMG_SaveWEBPAnimation_IO(3)
and that's the page!! mwah π this lil beauty lives in the SDL_image manual, version 3.4.8 β so go forth, save your animations, close your IOStreams responsibly, and remember: quality 100 or nothing. periodt. πβ¨ππ¦πΈπ π«Ά
π¦ where this page comes from
- fedora 43: SDL3_image-devel 3.4.8-1.fc43 Β· Zlib AND (HPND-Pbmplus AND Zlib) AND MIT AND (MIT OR Unlicense) AND LicenseRef-Fedora-Public-Domain
- fedora 43: SDL3_image-devel 3.4.8-1.fc43 Β· Zlib AND (HPND-Pbmplus AND Zlib) AND MIT AND (MIT OR Unlicense) AND LicenseRef-Fedora-Public-Domain
- fedora 44: SDL3_image-devel 3.4.8-1.fc44 Β· Zlib AND (HPND-Pbmplus AND Zlib) AND MIT AND (MIT OR Unlicense) AND LicenseRef-Fedora-Public-Domain
- fedora 44: SDL3_image-devel 3.4.8-1.fc44 Β· Zlib AND (HPND-Pbmplus AND Zlib) AND MIT AND (MIT OR Unlicense) AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms