IMG_CREATEANIMATIONDECODER_IO(3)
π IMG_CreateAnimationDecoder_IO(3) π
okay so bestie, welcome to the SDL_image3 girlies' corner of the manual pages β¨ this one lives in the FUNCTIONS section and it's literally the glow-up your image-loading era has been waiting for.
πΈ NAME πΈ
IMG_CreateAnimationDecoder_IO β she builds you a decoder that reads a whole series of images (a.k.a. an animation, a.k.a. the moment it all pops off) straight out of an IOStream. π
β¨ SYNOPSIS β¨
#include <SDL3_image/SDL_image.h>
IMG_AnimationDecoder * IMG_CreateAnimationDecoder_IO(SDL_IOStream *src, bool closeio, const char *type);
no cap, that's the whole signature. one call. iconic. π
π¦ DESCRIPTION π¦
here's the tea: this function hands you back a decoder, and that decoder is obsessed with reading a whole series of images from an IOStream. like, all the frames. the full main character arc. π
these animation types are currently supported (the VIP list, the guest list, the whole thing):
ANIAPNGAVIFSGIFWEBP
now, about closeio, because this part lowkey matters a lot:
ifcloseioistrue, thensrcwill be closed before returning if this function fails β or it'll be closed when the animation decoder is closed, if this function succeeds. either way,truemeans you're handing over the keys and she's locking up when she leaves. ποΈ
π«Ά FUNCTION PARAMETERS π«Ά
srcβ anSDL_IOStreamholding a series of images. that's the source material, the raw footage, the content. πΌcloseioβtrueto close theSDL_IOStreamwhen done,falseto leave it open. your call, bestie, but you do have to make one.typeβ a filename extension that represents this data ("WEBP", etc). yes it's a string, yes you write it like that. π«
β RETURN VALUE β
returns a brand new IMG_AnimationDecoder on success β slay β or NULL on failure. π
if you get NULL, do not just sit there wondering what went wrong: call SDL_GetError() for more information. she will tell you. fr fr.
π AVAILABILITY π
this function is available since SDL_image 3.4.0. so if you're on something older, it's giving not yet, sorry babe. π
π₯ SEE ALSO π₯
the whole friend group, obviously:
IMG_CreateAnimationDecoder(3)IMG_CreateAnimationDecoderWithProperties(3)IMG_GetAnimationDecoderFrame(3)IMG_ResetAnimationDecoder(3)IMG_CloseAnimationDecoder(3)
and that's the page, bestie!! π this was SDL_image documentation, version SDL_image 3.4.8, and yes the header says IMG_CreateA...onDecoder_IO(3) because even manpage titles get truncated for the aesthetic. π mwah, go decode something gorgeous. π¦β¨
π¦ 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