IMG_isTIF(3)

πŸ’– IMG_isTIF(3) β€” the TIFF detector, bestie πŸ’–

okay so welcome to SDL_image3 FUNCTIONS, bestie β€” this page is literally all about IMG_isTIF(3), and it’s giving β€œtiny peek, big verdict” energy ✨


🌸 NAME 🌸

IMG_isTIF β€” detect TIFF image data on a readable/seekable SDL_IOStream.


✨ SYNOPSIS ✨

#include <SDL3_image/SDL_image.h>

bool IMG_isTIF(SDL_IOStream *src);

that’s the whole signature, no cap πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so this function attempts to determine if a file is a given filetype β€” in this case, TIFF β€” and it reads the least amount possible from the SDL_IOStream (usually just a few bytes). tiny sniff, iconic behavior πŸŽ€

there is no distinction made between β€œnot the filetype in question” and basic i/o errors. like, it will not tattle about which one happened 😭

this function 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. but assuming seeking works, this means you can immediately use this with a different IMG_isTYPE function, or load the image without further seeking. bestie-friendly chaining, periodt 🫢

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 this is a vibe check, not a mandatory step 🌈


πŸ’œ FUNCTION PARAMETERS πŸ’œ

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

πŸŽ€ RETURN VALUE πŸŽ€

returns true if this is TIFF data, false otherwise. that’s the whole mood πŸ’–


πŸ¦‹ AVAILABILITY πŸ¦‹

this function is available since SDL_image 3.0.0.


🌈 SEE ALSO 🌈

go read these next, bestie:


okay that’s the whole page πŸ’– signing off from the footer tea: source is SDL_image, version is SDL_image 3.4.4, and the title is IMG_isTIF(3) β€” the footer didn’t give us a date, so we’re not inventing one, bestie πŸ’€πŸ«Ά

πŸ“¦ where this page comes from