IMG_isXCF(3)

πŸŽ€ NAME πŸŽ€

IMG_isXCF β€” detect XCF image data on a readable/seekable SDL_IOStream.

Okay bestie, welcome to the SDL_image3 FUNCTIONS corner of the manual β€” this page is IMG_isXCF(3), and it’s here to help you vibe-check whether some data is XCF. πŸ’–


✨ SYNOPSIS ✨

#include <SDL3_image/SDL_image.h>

bool IMG_isXCF(SDL_IOStream *src);

πŸ’… DESCRIPTION πŸ’…

So this function tries to figure out if a file is a given filetype, and it reads the least amount possible from the SDL_IOStream β€” usually just a few bytes. Lowkey efficient, highkey iconic. ✨

There is no distinction made between β€œnot the filetype in question” and basic i/o errors. Like, it’s not gonna tell you which one happened, bestie 😭.

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. But assuming seeking works, this means you can immediately use this with a different IMG_isTYPE function, or load the image without further seeking. Slay. 🫢

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 yeah, this is a vibe check, not a mandatory step. πŸ’…


🌸 FUNCTION PARAMETERS 🌸

  • src β€” a seekable/readable SDL_IOStream to provide image data.

πŸ¦‹ RETURN VALUE πŸ¦‹

Returns true if this is XCF data, false otherwise.


⭐ AVAILABILITY ⭐

This function is available since SDL_image 3.0.0.


🌈 SEE ALSO 🌈


That’s the whole page, bestie πŸ’– β€” brought to you by SDL_image 3.4.4. Periodt. πŸ‘‘

πŸ“¦ where this page comes from