IMG_CREATEANIMATIONDECODER(3)

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

πŸ’– IMG_CreateAnimationDecoder πŸ’–

okay bestie, welcome to the SDL_image3 girlies' section of the manual, where we're talking about IMG_CreateAnimationDecoder(3) β€” yes it's a mouthful, no you don't have to say it out loud, just vibe with me here ✨

✨ NAME ✨

IMG_CreateAnimationDecoder β€” makes you a decoder so you can read a whole lil series of images out of a file πŸŽ€

🌸 SYNOPSIS 🌸

#include <SDL3_image/SDL_image.h>

IMG_AnimationDecoder * IMG_CreateAnimationDecoder(const char *file);

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: this is the function that hands you back an animation decoder, which is exactly what it sounds like β€” a thing that reads a series of images from one file, i.e. an animation, i.e. the moving pictures, i.e. the main character energy 🫢

These animation types are currently supported, no cap:

  • ANI
  • APNG
  • AVIFS
  • GIF
  • WEBP

and the way it figures out which one you've got is by peeking at the file extension. so like, "file.webp" is gonna get decoded using WEBP. that's it, that's the whole vibe check πŸ‘‘

πŸ’… FUNCTION PARAMETERS πŸ’…

  • file β€” the file that's holding your series of images. your whole animation. the source of the drama 🌈

⭐ RETURN VALUE ⭐

You get back a brand new IMG_AnimationDecoder ✨ …or NULL if it flopped 😭 and if it flopped, go call SDL_GetError() for the deets, because that's where the real info lives.

πŸ‘‘ AVAILABILITY πŸ‘‘

This function has been available since SDL_image 3.4.0. periodt.

🧚 SEE ALSO 🧚


and that's the page bestie!! it's from SDL_image 3.4.8 (the SDL_image manual, mwah) and you're literally so welcome, go decode something iconic πŸ’–πŸŒΈπŸ’…

πŸ“¦ where this page comes from