IMG_SaveICO(3)

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

πŸ’Ύ IMG_SaveICO(3) β€” it's giving "save that surface as an ICO" energy πŸ’…

okay bestie, welcome to the IMG_SaveICO page from the SDL_image3 FUNCTIONS manual. no cap, this one is short and sweet β€” it literally just yeets your SDL_Surface into an .ico file on disk. iconic behavior fr fr. ✨


🌸 NAME 🌸

IMG_SaveICO β€” save an SDL_Surface into a ICO image file. that's it, that's the whole job. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <SDL3_image/SDL_image.h>

bool IMG_SaveICO(SDL_Surface *surface, const char *file);

πŸ’– DESCRIPTION πŸ’–

so like, if the file already exists? it gets overwritten. no warning, no "are you sure", no dramatic goodbye β€” it's gone, bestie. 🫢


✨ FUNCTION PARAMETERS ✨

  • surface β€” the SDL_Surface you wanna save. your little pixel baby. πŸ–ΌοΈ
  • file β€” the path on the filesystem where the new file gets written. point it at where you want the ICO to live. πŸ“

πŸ”₯ RETURN VALUE πŸ”₯

returns true on success or false on failure. if it's a flop, call SDL_GetError() for more info β€” she'll tell you what went wrong. 😭


πŸ‘‘ AVAILABILITY πŸ‘‘

this function is available since SDL_image 3.4.0. so if you're on something older, sorry babe, it's not there. πŸ’€


🌈 SEE ALSO 🌈

  • IMG_SaveICO_IO(3) β€” the sibling, the main character's other half. go look. iykyk. πŸ’œ

lowkey reminder: it overwrites. back up your stuff if you're emotionally attached to it. πŸ™ˆ

that's the whole page, bestie β€” short, slay, and to the point. πŸ“

SDL_image version 3.4.8, page IMG_SaveICO(3), brought to you by the SDL_image girlies. mwah. πŸ’‹πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from