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/readable SDL_IOStream to 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