IMG_isCUR(3)

πŸ’– IMG_isCUR(3) πŸ’–

Okay bestie, welcome to the SDL_image3 FUNCTIONS page for IMG_isCUR(3) ✨ This is your little vibe check for CUR image data, and we’re gonna get into it.


🌸 NAME 🌸

IMG_isCUR β€” detect CUR image data on a readable/seekable SDL_IOStream. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3_image/SDL_image.h>

bool IMG_isCUR(SDL_IOStream *src);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so this function attempts to determine if a file is a given filetype, reading the least amount possible from the SDL_IOStream β€” usually just a few bytes. Lowkey efficient, no cap. ⭐

Real talk: there is no distinction made between β€œnot the filetype in question” and basic i/o errors. It’s giving β€œwe’re not gonna overexplain that part” energy. πŸ’€

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, that means you can immediately use this with a different IMG_isTYPE function, or load the image without further seeking. So convenient, 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 like a little peek than a mandatory step ✨


🧚 FUNCTION PARAMETERS 🧚

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

🌈 RETURN VALUE 🌈

Returns true if this is CUR data, false otherwise. Periodt. πŸ‘‘


⭐ AVAILABILITY ⭐

This function is available since SDL_image 3.0.0. Iconic behavior since day one, fr fr πŸ’–


πŸ”₯ SEE ALSO πŸ”₯

Go show these sibling functions some love too, bestie πŸ˜­πŸ’œ


This page is serving SDL_image 3.4.4 energy, and that’s the cute little sign-off: source SDL_image, version 3.4.4, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from