IMG_LoadJPG_IO(3)
π IMG_LoadJPG_IO
okay so bestie, welcome to another β¨ SDL_image3 FUNCTIONS β¨ moment β this one's the JPG-direct-loading queen, IMG_LoadJPG_IO(3), and she is very straightforward and very iconic π
πΈ NAME
IMG_LoadJPG_IO β load a JPG image directly. no detours, no drama, just vibes and pixels π
β¨ SYNOPSIS
#include <SDL3_image/SDL_image.h>
SDL_Surface * IMG_LoadJPG_IO(SDL_IOStream *src);
π¦ DESCRIPTION
okay so here's the tea π« β if you know you definitely have a JPG image, like you're 100% sure, no cap, then you can call this function and it will skip SDL_image's file format detection routines entirely. it's giving "I already know who I am" energy π
but lowkey? generally it's better to use the abstract interfaces instead. and also β heads up β there is only an SDL_IOStream interface available here. that's the whole menu, bestie. no other flavour π
π FUNCTION PARAMETERS
srcβ anSDL_IOStreamto load image data from. that's the source of truth, the vibe provider, the place the pixels live π«Ά
β RETURN VALUE
returns an SDL_Surface, or NULL on error π (so like, always check, fr fr β a NULL is not the moment to be delulu)
π AVAILABILITY
this function is available since SDL_image 3.0.0 β she's been here a minute, an OG π
π SEE ALSO
IMG_LoadAVIF_IO(3)IMG_LoadBMP_IO(3)IMG_LoadCUR_IO(3)IMG_LoadGIF_IO(3)IMG_LoadICO_IO(3)IMG_LoadJXL_IO(3)IMG_LoadLBM_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)
like, the whole _IO friend group π§ they all ate, honestly.
mwah π that's the page! brought to you by SDL_image, version SDL_image 3.4.4 β go forth and load those JPGs, bestie, you've got this π₯π¦π
π¦ 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