IMG_isQOI(3)
okay so bestie, you're looking at IMG_isQOI(3) from the SDL_image3 FUNCTIONS universe β manual name folded in right here, cute and accounted for. π
β¨ NAME β¨
IMG_isQOI β detect QOI image data on a readable/seekable SDL_IOStream. That's the whole assignment. π
πΈ SYNOPSIS πΈ
#include <SDL3_image/SDL_image.h>
bool IMG_isQOI(SDL_IOStream *src);
π¦ DESCRIPTION π¦
So IMG_isQOI literally attempts to determine if a file is a given filetype, and it does that by reading the least amount possible from the SDL_IOStream β usually just a few bytes. lowkey polite of it. β¨
There is no distinction made between "not the filetype in question" and basic i/o errors. Same false vibe, no extra explanation. π
This function will always attempt to seek src back to where it started when this function was called. 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. no extra seek era needed, periodt. π
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 a vibe check, not a required step. π«Ά
π FUNCTION PARAMETERS π
srcβ a seekable/readableSDL_IOStreamto provide image data. That's the whole parameter, bestie. π
π RETURN VALUE π
Returns true if this is QOI data, false otherwise. That's it β iconic binary clarity. β
π AVAILABILITY π
This function is available since SDL_image 3.0.0. So if you're on that version or later, slay. π
π SEE ALSO π
go check out these other IMG_isTYPE besties:
IMG_isANI(3)IMG_isAVIF(3)IMG_isBMP(3)IMG_isCUR(3)IMG_isGIF(3)IMG_isICO(3)IMG_isJPG(3)IMG_isJXL(3)IMG_isLBM(3)IMG_isPCX(3)IMG_isPNG(3)IMG_isPNM(3)IMG_isSVG(3)IMG_isTIF(3)IMG_isWEBP(3)IMG_isXCF(3)IMG_isXPM(3)IMG_isXV(3)
okay bye bestie, this page is stamped from SDL_image 3.4.4 β that's the source/version footer situation, and there's no date line printed on this one, so no invented date, periodt. mwah πβ¨π
π¦ where this page comes from
- ubuntu stonking: libsdl3-image-doc 3.4.4+ds-2 Β· zlib/libpng AND HPND-like AND zlib-like-permissive
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms