IMG_LoadLBM_IO(3)
π IMG_LoadLBM_IO(3) β aka the "yes bestie I already know it's an LBM" loader
okay so real talk, this one lives in the SDL_image3 FUNCTIONS crew, and it's your shortcut for when you are one hundred percent certain about your file format. no detectives needed π΅οΈββοΈ
β¨ SYNOPSIS β¨
#include <SDL3_image/SDL_image.h>
SDL_Surface * IMG_LoadLBM_IO(SDL_IOStream *src);
literally just one call, one argument, and it hands you back a surface. slay.
π¦ DESCRIPTION π¦
so here's the vibe: if you know you definitely have a LBM image β like, no doubt in your heart, no second-guessing β you can call this function and it will skip SDL_image's file format detection routines entirely. it's giving "I already checked, thanks" β
generally it's better to use the abstract interfaces though, ngl. and heads up: there is only an SDL_IOStream interface available here β that's the whole menu, no other flavors. π
πΈ FUNCTION PARAMETERS πΈ
srcβ anSDL_IOStreamto load image data from. this is your snack source, your data faucet, your main character input. π
β RETURN VALUE β
returns an SDL_Surface, or NULL on error. so like... check it, bestie. don't just rawdog the pointer and hope for the best π
π AVAILABILITY π
this function is available since SDL_image 3.0.0. so if you're on anything older, sorry babe, it's not gonna be there. π«Ά
π SEE ALSO π
the whole squad of format-specific loaders, all together, all iconic:
IMG_LoadAVIF_IO(3)IMG_LoadBMP_IO(3)IMG_LoadCUR_IO(3)IMG_LoadGIF_IO(3)IMG_LoadICO_IO(3)IMG_LoadJPG_IO(3)IMG_LoadJXL_IO(3)IMG_LoadPCX_IO(3)IMG_LoadPNG_IO(3)IMG_LoadPNM_IO(3)IMG_LoadQOI_IO(3)IMG_LoadSVG_IO(3)IMG_LoadTGA_IO(3)IMG_LoadTIF_IO(3)IMG_LoadWEBP_IO(3)IMG_LoadXCF_IO(3)IMG_LoadXPM_IO(3)IMG_LoadXV_IO(3)
π quick reminder before you go: this skips detection. if you don't actually have an LBM, that's on you, not on the function. no cap.
and that's the whole page, bestie! brought to you by SDL_image version SDL_image 3.4.4 β go forth and load your LBM files with confidence π β¨π
π¦ 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