IMG_CREATEANIMATIONENCODER_IO(3)

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

πŸ’– IMG_CreateAnimationEncoder_IO(3) πŸ’–

okay bestie, welcome to the SDL_image3 functions corner of the manual β€” this is where the magic happens ✨

🌸 NAME 🌸

IMG_CreateAnimationEncoder_IO β€” creates an encoder so you can save a whole series of images into an IOStream. it's giving "make me a little movie" energy 🎬


✨ SYNOPSIS ✨

#include <SDL3_image/SDL_image.h>

IMG_AnimationEncoder * IMG_CreateAnimationEncoder_IO(SDL_IOStream *dst, bool closeio, const char *type);

like yes, that's the whole thing, she's compact πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so these animation types are the ones currently supported, no cap:

  • ANI
  • APNG
  • AVIFS
  • GIF
  • WEBP

now listen, about closeio β€” this is the part where you actually pay attention πŸ™ˆ If closeio is true, then dst will be closed before returning if this function fails, or when the animation encoder is closed if this function succeeds. literally both paths, she's covered πŸ’…


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • dst β€” an SDL_IOStream that's gonna be used to save the stream. that's her job, that's what she does 🫢
  • closeio β€” true to close the SDL_IOStream when done, false to leave it open. your call, main character πŸ’œ
  • type β€” a filename extension that represents this data ("WEBP", etc). yes, extensions, the little strings, iconic ⭐

🌈 RETURN VALUE 🌈

returns a shiny new IMG_AnimationEncoder, or NULL on failure 😭 β€” and if you get NULL, go call SDL_GetError() for more information, she'll tell you what went wrong, fr fr.


πŸ’« AVAILABILITY πŸ’«

this function is available since SDL_image 3.4.0. old news but still slaying ✨


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, go read them too 🧚


mwah πŸ’‹ that's the page, bestie β€” brought to you by SDL_image 3.4.8, aka the version this manual page came from. go forth and encode your little animations, i'm obsessed πŸ“πŸ’–

πŸ“¦ where this page comes from