IMG_GETANIMATIONDECODERPROPERTIES(3)

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

πŸ’– IMG_GetAnimationDecoderProperties πŸ’–

okay bestie, welcome to the SDL_image3 FUNCTIONS corner of the manual πŸ’… this one's a lil cutie: it's the function that lets you peek at all the juicy metadata an animation decoder is holding onto. IMG_GetAnimationDecoderProperties, we love her, no cap.


✨ NAME ✨

IMG_GetAnimationDecoderProperties</p> β€” get the properties of an animation decoder. πŸŽ€


🌸 SYNOPSIS 🌸

#include <SDL3_image/SDL_image.h>

SDL_PropertiesID IMG_GetAnimationDecoderProperties(IMG_AnimationDecoder *decoder);

#define IMG_PROP_METADATA_IGNORE_PROPS_BOOLEAN                 "SDL_image.metadata.ignore_props"
#define IMG_PROP_METADATA_DESCRIPTION_STRING                   "SDL_image.metadata.description"
#define IMG_PROP_METADATA_COPYRIGHT_STRING                     "SDL_image.metadata.copyright"
#define IMG_PROP_METADATA_TITLE_STRING                         "SDL_image.metadata.title"
#define IMG_PROP_METADATA_AUTHOR_STRING                        "SDL_image.metadata.author"
#define IMG_PROP_METADATA_CREATION_TIME_STRING                 "SDL_image.metadata.creation_time"
#define IMG_PROP_METADATA_FRAME_COUNT_NUMBER                   "SDL_image.metadata.frame_count"
#define IMG_PROP_METADATA_LOOP_COUNT_NUMBER                    "SDL_image.metadata.loop_count"

like, look at all those property name macros. eight of them. they're literally just strings, but they're the strings you use to look stuff up. iykyk πŸ¦‹


🫢 DESCRIPTION 🫢

so basically this function hands you back the properties of the animation decoder. that decoder is holding info about the underlying image β€” think description, copyright text, loop count, all that good stuff. it's giving ✨backstage pass to the metadata✨.

one thing tho, and this one matters: IMG_PROP_METADATA_LOOP_COUNT_NUMBER, if present, tells you how many times the animation should play. and if it's 0? that means loop continuously, forever, main character energy, no off-switch. πŸ’€


🌈 FUNCTION PARAMETERS 🌈

  • decoder β€” the animation decoder. that's it, that's the whole parameter list bestie, she's low maintenance πŸŽ€

⭐ RETURN VALUE ⭐

you get back the properties ID of the animation decoder πŸ’–. but if there are no properties, you get 0 instead β€” and then you gotta call SDL_GetError() for more info. so check that return value, okay? don't just vibe past a zero πŸ™ˆ


🧚 AVAILABILITY 🧚

this function has been available since SDL_image 3.4.0 β€” so if you're on anything older, sorry bestie, she's not there yet πŸ’œ


πŸ‘‘ SEE ALSO πŸ‘‘

like, obviously go read those too, they're the ones that make the decoder in the first place πŸ”₯


SDL_image Β· version SDL_image 3.4.8 β€” that's the source and the version, mwah, ty for reading my little page, ily, go write some slay animation code πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from