IMG_isXPM(3)
π IMG_isXPM(3) π
okay so bestie, welcome to the SDL_image3 FUNCTIONS chapter β this page is all about IMG_isXPM, and it's lowkey iconic. β¨
πΈ NAME πΈ
IMG_isXPM β detect XPM image data on a readable/seekable SDL_IOStream.
π SYNOPSIS π
#include <SDL3_image/SDL_image.h>
bool IMG_isXPM(SDL_IOStream *src);
π¦ DESCRIPTION π¦
This function tries 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. π
No cap: there is no distinction made between βnot the filetype in questionβ and basic i/o errors. π
It's always gonna 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, that means you can immediately use this with a different IMG_isTYPE function, or load the image without further seeking. π«Ά
And 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. π
π«Ά FUNCTION PARAMETERS π«Ά
srcβ a seekable/readableSDL_IOStreamto provide image data.
π RETURN VALUE π
Returns true if this is XPM data, false otherwise. Periodt. π
π AVAILABILITY π
This function is available since SDL_image 3.0.0. β
π₯ SEE ALSO π₯
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_isQOI(3), IMG_isSVG(3), IMG_isTIF(3), IMG_isWEBP(3), IMG_isXCF(3), IMG_isXV(3)
okay that's the whole vibe check, bestie π«Ά footer tea: source/version is SDL_image 3.4.4, and this page is IMG_isXPM(3). The footer doesn't print a date, so I'm not inventing one β periodt π
π
π¦ 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