IMG_isJXL(3)

🌸 NAME 🌸

IMG_isJXL(3) is a page from the SDL_image3 FUNCTIONS fam. IMG_isJXL β€” detect JXL image data on a readable/seekable SDL_IOStream. πŸ’–

✨ SYNOPSIS ✨

#include <SDL3_image/SDL_image.h>

bool IMG_isJXL(SDL_IOStream *src);

πŸŽ€ DESCRIPTION πŸŽ€

Okay so here’s the tea: this function tries to determine if a file is a given filetype, and it reads the least amount possible from the SDL_IOStream β€” usually just a few bytes. ✨

It makes no distinction between β€œnot the filetype in question” and basic i/o errors. None. Zero. The audacity 😭.

Basically, a basic i/o error can look exactly like β€œnope, not this filetype” β€” messy, but that’s the deal πŸ’€

On the seek side: it will always attempt to seek src back to where it started when this function was called, but it will not report any errors in doing so. Assuming seeking works, that means you can immediately use this with a different IMG_isTYPE function, or load the image without further seeking. Slay. πŸ’…

You do not need to call this function to load data; SDL_image can work to determine file type in many cases in its standard load functions. So it’s a vibe-check helper, not a mandatory step. 🫢

πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • src β€” a seekable/readable SDL_IOStream to provide image data. πŸŽ€

🌈 RETURN VALUE 🌈

Returns true if this is JXL data, false otherwise. Iconic binary behavior, no notes. πŸ’…

⭐ AVAILABILITY ⭐

This function is available since SDL_image 3.0.0. ✨

πŸ‘‘ SEE ALSO πŸ‘‘


Alright bestie, that’s the page! Big sparkly thanks to the SDL_image 3.4.4 footer for the source/version; the original footer doesn’t show a date, so I’m not making one up. πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from