IMG_LoadAnimation(3)

🎬 IMG_LoadAnimation(3) 🎬

okay bestie, welcome to the SDL_image3 FUNCTIONS section β€” we're talking about IMG_LoadAnimation, and she is genuinely main character energy for animated files. ✨

🌸 NAME 🌸

IMG_LoadAnimation β€” Load an animation from a file. πŸ’…

✨ SYNOPSIS ✨

#include <SDL3_image/SDL_image.h>

IMG_Animation * IMG_LoadAnimation(const char *file);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so IMG_LoadAnimation does exactly what it says on the tin: it loads an animation from a file. no cap. πŸŽ€

when you're done with the returned animation, the app should dispose of it with a call to IMG_FreeAnimation(). like, do not leave it hanging, bestie β€” clean up your animation. 🫢

🧚 FUNCTION PARAMETERS 🧚

  • file β€” path on the filesystem containing an animated image. that's the whole assignment. πŸ“

⭐ RETURN VALUE ⭐

Returns a new IMG_Animation, or NULL on error. so if it's NULL, that's the error vibe check failing. 😭

πŸ’œ AVAILABILITY πŸ’œ

This function is available since SDL_image 3.0.0. so she's been around, and she's iconic for it. πŸ‘‘

πŸ”₯ SEE ALSO πŸ”₯


cute sign-off from the footer: this page is from SDL_image 3.4.4, and the date slot is lowkey not giving a date on this page β€” still iconic, bye bestie! πŸ’–πŸ¦‹

πŸ“¦ where this page comes from