Detect CUR image data on a readable/seekable SDL_IOStream.
Defined in <SDL3_image/SDL_image.h>
bool IMG_isCUR(SDL_IOStream *src);
SDL_IOStream * | src | a seekable/readable SDL_IOStream to provide image data. |
(bool) Returns non-zero if this is CUR data, zero otherwise.
This function attempts to determine if a file is a given filetype, reading the least amount possible from the SDL_IOStream (usually a few bytes).
There is no distinction made between "not the filetype in question" and basic i/o errors.
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.
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.
This function is available since SDL_image 3.0.0.