IMG_Anima...derStatus(3type)

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

πŸ’– NAME πŸ’–

IMG_AnimationDecoderStatus β€” an enum that's literally the vibe check for your animation decoder, bestie. It tells you how the decoder is doing: valid, ready, failed, or all done. ✨

This is a page from the SDL_image3 DATATYPES chapter, and the full title up top is IMG_Anima...derStatus(3type) (yes the terminal truncated it, it's fine, we know what it means 🫢).


🌸 SYNOPSIS 🌸

#include <SDL3_image/SDL_image.h>

typedef enum IMG_AnimationDecoderStatus
{
    IMG_DECODER_STATUS_INVALID = -1,    /**< The decoder is invalid */
    IMG_DECODER_STATUS_OK,              /**< The decoder is ready to decode the next frame */
    IMG_DECODER_STATUS_FAILED,          /**< The decoder failed to decode a frame, call SDL_GetError() for more information. */
    IMG_DECODER_STATUS_COMPLETE         /**< No more frames available */
} IMG_AnimationDecoderStatus;

✨ DESCRIPTION ✨

Okay so, picture this: you're decoding an animation, frame by frame, and you need to know what's going on. This enum is the answer. It's a status code, it's giving traffic light, it's giving "am I okay or not" β€” and it has exactly four moods:

  • IMG_DECODER_STATUS_INVALID = -1 β€” the decoder is invalid. πŸ’€ Not it. Nothing's happening here.
  • IMG_DECODER_STATUS_OK β€” the decoder is ready to decode the next frame. Slay, we're so back. πŸ‘‘
  • IMG_DECODER_STATUS_FAILED β€” the decoder failed to decode a frame. Uh oh bestie. Call SDL_GetError() for more information, fr fr.
  • IMG_DECODER_STATUS_COMPLETE β€” no more frames available. That's a wrap, the animation ate and left no crumbs. πŸŽ€
No cap: the -1 on IMG_DECODER_STATUS_INVALID is real and it's in the code, so don't go assuming these are 0,1,2,3 in that exact order without checking. The first one is -1, periodt.

πŸ¦‹ AVAILABILITY πŸ¦‹

This enum is available since SDL_image 3.4.0. So if you're on anything older, it's not giving what you need, unfortunately. πŸ™ˆ


πŸ’œ SEE ALSO πŸ’œ

(nothing extra listed on this page β€” just the enum, living its main character life)


and that's the whole page, bestie! 🧚 This was IMG_AnimationDecoderStatus(3type) from SDL_image 3.4.8, so go forth and decode your animations with full awareness of all four statuses. β­πŸ’…πŸ“

πŸ“¦ where this page comes from