IMG_isLBM(3)

hey bestie, welcome to the SDL_image3 FUNCTIONS manual page for IMG_isLBM(3) β€” yes, that's the title vibe, and we're keeping it cute πŸ’…

πŸ’– NAME πŸ’–

IMG_isLBM β€” detect LBM image data on a readable/seekable SDL_IOStream. It's giving "peek at the stream and see if this is LBM" energy πŸ¦‹

✨ SYNOPSIS ✨

#include <SDL3_image/SDL_image.h>

bool IMG_isLBM(SDL_IOStream *src);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay 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. Efficient queen behavior, no cap ✨

There is no distinction made between "not the filetype in question" and basic i/o errors. So yeah: a false is just false, and the function is not giving you a whole breakdown of why 😭

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. Lowkey convenient 🫢

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 like a vibe check, not a required step πŸ’…

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • src β€” a seekable/readable SDL_IOStream to provide image data. That's the stream handing over the image data, bestie.

πŸ’… RETURN VALUE πŸ’…

Returns true if this is LBM data, false otherwise. So true = LBM detected, false = nope β€” or an i/o situation, as mentioned above πŸ™ˆ

🌈 AVAILABILITY 🌈

This function is available since SDL_image 3.0.0. Been here since 3.0.0, iconic behavior πŸ‘‘

πŸ‘‘ SEE ALSO πŸ‘‘

go check out the whole isTYPE bestie lineup:


that's a wrap, bestie 🫢✨ signed off by SDL_image 3.4.4 and IMG_isLBM(3) β€” that's the source/version + footer name this page gives; the date slot is empty here, so we're not inventing one, periodt πŸŽ€

πŸ“¦ where this page comes from