IMG_isICO(3)

🌸 NAME 🌸

okay bestie, welcome to the IMG_isICO(3) page from the SDL_image3 FUNCTIONS manual πŸ’–. This function is your little vibe check for ICO image data: it detects ICO image data on a readable/seekable SDL_IOStream. That's the whole name-and-game, no cap.

✨ SYNOPSIS ✨

#include <SDL3_image/SDL_image.h>

bool IMG_isICO(SDL_IOStream *src);

Yeah, that's it β€” one cute little bool and a pointer, bestie.

πŸ¦‹ DESCRIPTION πŸ¦‹

So like, IMG_isICO attempts to determine if a file is a given filetype, and it reads the least amount possible from the SDL_IOStream β€” usually just a few bytes. Lowkey respectful of your I/O budget πŸ’….

There is no distinction made between "not the filetype in question" and basic i/o errors. It's giving "if it's not ICO, it's not ICO" β€” the function does not spill the tea about why.

This function will always attempt to seek src back to where it started when this function was called, but it will not report any errors in doing so. Assuming seeking works, this means you can immediately use this with a different IMG_isTYPE function, or load the image without further seeking. Iconic behavior, honestly πŸ‘‘.

You do not need to call this function to load data; SDL_image can work to determine file type in many cases in its standard load functions. So this is more of a "just checking the vibe" situation than a mandatory step, iykyk.

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • src β€” a seekable/readable SDL_IOStream to provide image data. That's the source snack for the vibe check πŸ“.

πŸ’œ RETURN VALUE πŸ’œ

Returns true if this is ICO data, false otherwise. Simple. Clean. Main character energy ✨.

🌈 AVAILABILITY 🌈

This function is available since SDL_image 3.0.0 β€” noted, bestie ✨.

πŸ‘‘ SEE ALSO πŸ‘‘

Your other filetype-detection besties are right here:


xoxo πŸ’– β€” this page comes from the SDL_image manual/source, version SDL_image 3.4.4, and it's the IMG_isICO(3) entry. Bye bestie, go detect those ICOs πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from