IMG_SaveICO_IO(3)

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

πŸ’– IMG_SaveICO_IO πŸ’–

okay bestie, welcome to the SDL_image3 function zone ✨ this one lives in the IMG_SaveICO_IO(3) era of your life and it's literally about yeeting an SDL_Surface out into ICO image data through an SDL_IOStream πŸŽ€


🌸 NAME 🌸

IMG_SaveICO_IO β€” save an SDL_Surface into ICO image data, via an SDL_IOStream πŸ¦‹


✨ SYNOPSIS ✨

#include <SDL3_image/SDL_image.h>

bool IMG_SaveICO_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio);

πŸ’… DESCRIPTION πŸ’…

so like, if you're just trying to save to a filename and you don't wanna deal with streams at all? bestie, use IMG_SaveICO() instead, that's the whole vibe 🫢

and here's the tea you actually need to clock: if closeio is true, then dst gets closed before returning β€” and it does that whether this function succeeds or not. no cap. success, failure, doesn't matter, it's getting closed πŸ’€


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • surface β€” the SDL_Surface you wanna save, bestie. that's the one.
  • dst β€” the SDL_IOStream you're saving the image data into πŸ“₯
  • closeio β€” true if you want the SDL_IOStream closed/freed before returning, false if you want it left open. your call, main character πŸ‘‘

🌈 RETURN VALUE 🌈

returns true on success or false on failure 😭 and if it's giving failure, call SDL_GetError() for more info, that's where the receipts live 🧾


⭐ AVAILABILITY ⭐

this function is available since SDL_image 3.4.0 πŸŽ‰ so if you're on anything older, sorry babe, it's not there yet.


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page fr fr πŸ’œ sending you off with the classic: this was SDL_image, version SDL_image 3.4.8, straight from the SDL_image man pages β€” mwah, go save some icons bestie πŸ’…πŸŒΈ

πŸ“¦ where this page comes from