IMG_CREATEANIMATIONENCODER_IO(3)
π 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β anSDL_IOStreamthat's gonna be used to save the stream. that's her job, that's what she does π«Άcloseioβtrueto close theSDL_IOStreamwhen done,falseto 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 π
IMG_CreateAnimationEncoder(3)IMG_CreateAnimationEncoderWithProperties(3)IMG_AddAnimationEncoderFrame(3)IMG_CloseAnimationEncoder(3)
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
- 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