IMG_LoadAnimation_IO(3)
π NAME π
okay bestie, welcome to the IMG_LoadAnimation_IO(3) page from the SDL_image3 FUNCTIONS manual β¨ and it's literally about how to load an animation from an SDL_IOStream. main character energy only π
β¨ SYNOPSIS β¨
#include <SDL3_image/SDL_image.h>
IMG_Animation * IMG_LoadAnimation_IO(SDL_IOStream *src, bool closeio);
π¦ DESCRIPTION π¦
So here's the vibe: if closeio is true, src will be closed before returning β and yes, that's whether this function succeeds or not. No cap. SDL_image reads everything it needs from src during this call in any case, so it's not gonna be like "wait, I still need that stream later" β it's giving self-sufficient.
When you're done with the returned animation, the app should dispose of it with a call to IMG_FreeAnimation(). Please don't ghost your animations, bestie β free them π«Ά
πΈ FUNCTION PARAMETERS πΈ
srcβ anSDL_IOStreamthat data will be read from.closeioβtrueto close/free theSDL_IOStreambefore returning,falseto leave it open.
π RETURN VALUE π
Returns a new IMG_Animation, or NULL on error. Iconic when it works, NULL when it doesn't π
β AVAILABILITY β
This function is available since SDL_image 3.0.0 π
π SEE ALSO π
IMG_CreateAnimatedCursor(3)IMG_LoadAnimation(3)IMG_LoadAnimationTyped_IO(3)IMG_LoadANIAnimation_IO(3)IMG_LoadAPNGAnimation_IO(3)IMG_LoadAVIFAnimation_IO(3)IMG_LoadGIFAnimation_IO(3)IMG_LoadWEBPAnimation_IO(3)IMG_FreeAnimation(3)
π cute little sign-off flex: this page is from SDL_image, version 3.4.4 β and the footer doesn't list a date, so I'm not inventing one, bestie. periodt π
π
π¦ where this page comes from
- ubuntu stonking: libsdl3-image-doc 3.4.4+ds-2 Β· zlib/libpng AND HPND-like AND zlib-like-permissive
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms