IMG_LoadAnimationTyped_IO(3)
πΈ NAME πΈ
okay bestie, welcome to IMG_LoadAnimationTyped_IO(3) from the SDL_image3 FUNCTIONS crew β¨ This page is literally about how to Load an animation from an SDL_IOStream β that's the whole NAME vibe π
π SYNOPSIS π
#include <SDL3_image/SDL_image.h>
IMG_Animation * IMG_LoadAnimationTyped_IO(SDL_IOStream *src, bool closeio, const char *type);
π¦ DESCRIPTION π¦
So here's the tea, bestie: even though this function accepts a file type, SDL_image may still try other decoders that are capable of detecting file type from the contents of the image data. But for formats it cannot autodetect, it may rely on the caller-provided type string. If type is NULL, SDL_image will rely solely on its ability to guess the format. No cap, that's the format-detection situation π
If closeio is true, src will be closed before returning, whether this function succeeds or not. Important caveat, bestie: SDL_image reads everything it needs from src during this call in any case. So it's done with the stream by the time it returns π
When done with the returned animation, the app should dispose of it with a call to IMG_FreeAnimation(). Do not ghost that cleanup, fr fr π«Ά
π FUNCTION PARAMETERS π
srcβ anSDL_IOStreamthat data will be read from.closeioβtrueto close/free theSDL_IOStreambefore returning,falseto leave it open.typeβ a filename extension that represent this data ("GIF", etc).
π RETURN VALUE π
Returns a new IMG_Animation, or NULL on error. So if you get NULL, that's a no-animation moment, not a slay π
β AVAILABILITY β
This function is available since SDL_image 3.0.0. Periodt π
π SEE ALSO π
IMG_CreateAnimatedCursor(3)IMG_LoadAnimation(3)IMG_LoadAnimation_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)
Final footer vibe check, bestie: source/version is SDL_image 3.4.4, the page is IMG_LoadAnimationTyped_IO(3), and there's no date line listed, so we're not inventing one πβ¨
π¦ 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