IMG_LoadXPM_IO(3)

✨ NAME ✨

Bestie, welcome to IMG_LoadXPM_IO(3) β€” the direct-lane page for loading a XPM image. You're chilling in the SDL_image3 FUNCTIONS section, and this function is ready to do exactly one thing with main character energy πŸ’….

πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3_image/SDL_image.h>

SDL_Surface * IMG_LoadXPM_IO(SDL_IOStream *src);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so if you know you definitely have a XPM image β€” like, no detective work needed, it's XPM and that's that β€” you can call this function, and it will skip SDL_image's file format detection routines. It's giving "I already know my type, thanks" ✨.

Generally it's better to use the abstract interfaces. Also, heads up: there is only an SDL_IOStream interface available here. That's the whole vibe, no cap 🫢.

🌸 FUNCTION PARAMETERS 🌸

  • src β€” an SDL_IOStream to load image data from. That's the stream bestie, the image data comes from here πŸ’–.

πŸ’œ RETURN VALUE πŸ’œ

Returns SDL surface, or NULL on error. So if you get NULL, that's the "something went wrong" signal, and you're allowed to gasp dramatically 😭.

⭐ AVAILABILITY ⭐

This function is available since SDL_image 3.0.0. Iconic since day one, periodt πŸ‘‘.

🌈 SEE ALSO 🌈


Cute little sign-off time πŸŽ€: this page comes from SDL_image 3.4.4, and the footer doesn't print a date, so consider this your official no-date-but-still-adorable goodbye. Stay hydrated, read your manpages, and slay those image loads πŸ’–βœ¨

πŸ“¦ where this page comes from