IMG_LoadPNM_IO(3)
π¦ IMG_LoadPNM_IO(3) β a page from the SDL_image3 FUNCTIONS manual π¦
π NAME π
IMG_LoadPNM_IO β load a PNM image directly. Thatβs the headline, bestie, and it is serving exactly what it says on the tin. β¨
πΈ SYNOPSIS πΈ
#include <SDL3_image/SDL_image.h>
SDL_Surface * IMG_LoadPNM_IO(SDL_IOStream *src);
π DESCRIPTION π
Okay so picture this: you already know, like, for sure that the image you have is a PNM image. In that case you can call IMG_LoadPNM_IO, and it will skip SDL_imageβs file format detection routines. Shortcut era β‘
Generally, though, itβs better to use the abstract interfaces. Also important: there is only an SDL_IOStream interface available here β thatβs the whole interface menu, no cap. π
π«Ά FUNCTION PARAMETERS π«Ά
srcβ anSDL_IOStreamto load image data from. Thatβs the plug, bestie. π«Ά
π RETURN VALUE π
Returns a SDL surface, or NULL on error. So if it comes back NULL, thatβs the error timeline, not a vibe. π
π AVAILABILITY π
This function is available since SDL_image 3.0.0. Iconic behavior, honestly. π
π SEE ALSO π
These are the other format-specific besties β go say hi: π
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_LoadLBM_IO(3)IMG_LoadPCX_IO(3)IMG_LoadPNG_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)
π cute little sign-off: this pageβs source is the SDL_image manual, its version is SDL_image 3.4.4, and the footer didnβt give a date β so Iβm not inventing one, bestie. Stay slay out there! π«Άπ
π¦ 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