IMG_LoadTIF_IO(3)

πŸ’… IMG_LoadTIF_IO(3) β€” the "yes bestie I already know it's a TIFF" loader

okay so welcome to the SDL_image3 FUNCTIONS corner of the manual, this one's about IMG_LoadTIF_IO, and it is genuinely so straightforward it's kind of iconic ✨


🌸 NAME 🌸

IMG_LoadTIF_IO β€” load a TIFF image directly. no detective work, no vibes-based guessing, just straight in πŸŽ€


✨ SYNOPSIS ✨

#include <SDL3_image/SDL_image.h>

SDL_Surface * IMG_LoadTIF_IO(SDL_IOStream *src);

like, that's it. that's the whole signature. she's compact πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: if you know you definitely have a TIFF image, you can call this function and it will skip SDL_image's file format detection routines entirely. no sniffing, no "hmm what could this be", no main-character indecision β€” she just goes πŸƒβ€β™€οΈπŸ’¨

but ngl, generally it's better to use the abstract interfaces. that's the recommended path, fr fr. also β€” and this is important, don't miss it β€” there is only an SDL_IOStream interface available here. no filename version, no _RW situation, just the one. iykyk πŸ‘‘


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • src β€” an SDL_IOStream to load image data from. that's the source of the pixels, the whole entire vibe check πŸ’œ

πŸ”₯ RETURN VALUE πŸ”₯

returns an SDL_Surface, or NULL on error. so if you get NULL back, something went wrong β€” check your error, bestie, don't just stare at it 😭


⭐ AVAILABILITY ⭐

this function is available since SDL_image 3.0.0. she's been here a minute 🫢


🌈 SEE ALSO 🌈

the whole friend group, all the direct-loaders, all _IO, all slay:

(and yes, IMG_LoadTIF_IO is not in her own SEE ALSO list. she's humble like that πŸ™ˆ)


lowkey reminder: format detection is skipped here, so if it turns out not to be a TIFF you're on your own β€” no cap, that's just what the page says πŸ’€

mwah πŸ’‹ this page came to you courtesy of the SDL_image crew, version SDL_image 3.4.4, and yes that version string is doing double duty as the date slot in the footer, we respect the hustle πŸ“ go load some TIFFs, you've got this πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from