IMG_LoadPNG_IO(3)

πŸ¦‹ IMG_LoadPNG_IO(3) πŸ¦‹

okay so this is your girl from the SDL_image3 FUNCTIONS manual, and today we're loading a PNG directly. no detective work, no format-sniffing, just vibes and bytes. πŸ’…

🌸 NAME 🌸

IMG_LoadPNG_IO β€” load a PNG image directly.

✨ SYNOPSIS ✨

#include <SDL3_image/SDL_image.h>

SDL_Surface * IMG_LoadPNG_IO(SDL_IOStream *src);

πŸ’– DESCRIPTION πŸ’–

If you know β€” like, know know β€” that you definitely have a PNG image, you can call this function. It will skip SDL_image's file format detection routines. iconic shortcut behavior, fr fr.

Generally it's better to use the abstract interfaces. Also, there is only an SDL_IOStream interface available here. that's the whole tea. πŸ«–

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • src β€” an SDL_IOStream to load image data from. that's the source stream, bestie.

🫢 RETURN VALUE 🫢

Returns an SDL_Surface, or NULL on error. that's it, that's the return value. 😭

🌈 AVAILABILITY 🌈

This function is available since SDL_image 3.0.0. periodt. πŸ’œ

⭐ SEE ALSO ⭐

go peek at the other direct-load girlies:

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_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)


byeee πŸ’– this page is brought to you by source SDL_image, version SDL_image 3.4.4. the footer's date slot was giving mystery β€” no date was listed, so I'm not inventing one. periodt. πŸŽ€

πŸ“¦ where this page comes from