IMG_SaveAnimationTyped_IO(3)
π IMG_SaveAnimationTyped_IO(3) π
okay so bestie, you're in the SDL_image3 FUNCTIONS section of the SDL_image manual, and today's main character is IMG_SaveAnimationTyped_IO. it saves an animation to an SDL_IOStream and honestly? she ate. β¨
πΈ NAME πΈ
IMG_SaveAnimationTyped_IO β save an animation to an SDL_IOStream. no cap, that's literally the whole job. π
β¨ SYNOPSIS β¨
#include <SDL3_image/SDL_image.h>
bool IMG_SaveAnimationTyped_IO(IMG_Animation *anim, SDL_IOStream *dst, bool closeio, const char *type);
π¦ DESCRIPTION π¦
okay so first things first: if you just wanna save to a filename, you can use IMG_SaveAnimation() instead. that one's your girl for the simple path. this function is the one you call when you're working with an SDL_IOStream directly. π
now, about closeio: if it's true, then dst gets closed before returning β and yes, that's whether this function succeeds or not. it does not care. it does not wait. it closes. periodt. π
and for formats that accept a quality value, a default quality of 90 will be used. so if you were wondering "hmm what quality do I get if I don't say anything" β it's 90. mystery solved. π΅οΈβοΈ
π FUNCTION PARAMETERS π
animβ the animation to save. your blorbos, your moving pictures, your whole vibe. π«Άdstβ anSDL_IOStreamthat data will be written to. this is where the magic goes. β¨closeioβtrueto close/free theSDL_IOStreambefore returning,falseto leave it open. you're the one holding the door, so choose wisely. πͺtypeβ a filename extension that represent this data ("GIF", etc). yes, just the extension, like"GIF". not a whole path, not a whole mime type, just the lil extension bestie. π
π RETURN VALUE π
returns true on success or false on failure. and if it fails, please, please call SDL_GetError() for more information β she will tell you what went wrong, and it's giving helpful. π
β AVAILABILITY β
this function is available since SDL_image 3.4.0. so if you're on anything older, it's not there and you're gonna have a bad time. π
π SEE ALSO π
IMG_SaveAnimation(3)IMG_SaveANIAnimation_IO(3)IMG_SaveAPNGAnimation_IO(3)IMG_SaveAVIFAnimation_IO(3)IMG_SaveGIFAnimation_IO(3)IMG_SaveWEBPAnimation_IO(3)
and that's the whole page, bestie!! π₯³ this was SDL_image version 3.4.8 serving you IMG_SaveAnimationTyped_IO(3) realness. go save some animations, slay responsibly, and remember: false means check SDL_GetError(). mwah ππβ¨
π¦ 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