IMG_SaveAVIFAnimation_IO(3)

πŸ“¦
version 3.4.8 Β· 5 versions
, in fedora 43, fedora 44

πŸ’– 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 β€” an SDL_IOStream from which data will be written to. yes, the wording is a lil quirky but that's the manual talking, and we respect her. ✨
  • closeio β€” true to close/free the SDL_IOStream before returning, false to leave it open. it's giving "am I your problem after this or not". πŸ’€
  • quality β€” the desired quality, ranging between 0 (lowest) and 100 (highest). pick your vibe: 100 for main character energy, 0 for... 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:


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