IMG_isSVG(3)

🌸 NAME 🌸

hey bestie!! this is IMG_isSVG(3) from the SDL_image3 FUNCTIONS manual, and she's here to detect SVG image data on a readable/seekable SDL_IOStream 🫢 lowkey iconic filetype-detective behavior, no cap πŸ’…

✨ SYNOPSIS ✨

#include <SDL3_image/SDL_image.h>

bool IMG_isSVG(SDL_IOStream *src);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: IMG_isSVG tries to figure out if a file is a given filetype β€” in this case, SVG β€” and it reads the least amount possible from the SDL_IOStream to do it (usually just a few bytes ✨). efficiency queen fr fr.

There is no distinction between β€œnot the filetype in question” and basic i/o errors 😭. so if it says nope, don’t interrogate it for extra lore β€” that’s all you’re getting.

This function will always attempt to seek src back to where it started when this function was called. it will not report any errors in doing so. but assuming seeking works, this means you can immediately use src with a different IMG_isTYPE function, or load the image without further seeking. slay for seamless workflow πŸ’–

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 yeah, she’s useful, but not mandatory πŸ‘‘

🌈 FUNCTION PARAMETERS 🌈

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

⭐ RETURN VALUE ⭐

Returns true if this is SVG data, false otherwise. simple as that, no cap πŸ’…

πŸ‘‘ AVAILABILITY πŸ‘‘

This function is available since SDL_image 3.0.0. periodt.

🧚 SEE ALSO 🧚

go check out the whole is-something squad:


okay bye bestie!! footer tea: source/version is SDL_image 3.4.4, and there’s no date listed on this footer β€” so that’s the whole update πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from