IMG_GETANIMATIONDECODERPROPERTIES(3)
π 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 π
IMG_CreateAnimationDecoder(3)IMG_CreateAnimationDecoder_IO(3)IMG_CreateAnimationDecoderWithProperties(3)
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
- 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