IMG_isPNM(3)
NAME π
okay bestie, this is IMG_isPNM(3) from the SDL_image3 FUNCTIONS manual β the little function that detects PNM image data on a readable/seekable SDL_IOStream. π΅οΈββοΈβ¨
SYNOPSIS πΈ
#include <SDL3_image/SDL_image.h>
bool IMG_isPNM(SDL_IOStream *src);
DESCRIPTION π¦
so this function attempts 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. lowkey efficient, highkey iconic. π
It does not make any distinction between βnot the filetype in questionβ and basic i/o errors. no cap, that means a no can be either one. π
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. assuming seeking works, this means you can immediately use this with a different IMG_isTYPE function, or load the image without further seeking. slay. π«Ά
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 mandatory step. π
FUNCTION PARAMETERS π
srcβ a seekable/readableSDL_IOStreamto provide image data. that's the whole mood. β¨
RETURN VALUE πΈ
Returns true if this is PNM data, false otherwise. simple as that, bestie. π
AVAILABILITY π
This function is available since SDL_image 3.0.0. periodt. π
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_isQOI(3)IMG_isSVG(3)IMG_isTIF(3)IMG_isWEBP(3)IMG_isXCF(3)IMG_isXPM(3)IMG_isXV(3)
xoxo, your local manpage bestie π β footer tea: source/version SDL_image 3.4.4, page IMG_isPNM(3), and no date listed on this copy, bestie. π«Ά
π¦ 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