Scroll to navigation

IMG_isSVG(3) SDL_image3 FUNCTIONS IMG_isSVG(3)

NAME

IMG_isSVG - Detect SVG image data on a readable/seekable SDL_IOStream.

HEADER FILE

Defined in SDL3_image/SDL_image.h

SYNOPSIS

#include "SDL3_image/SDL_image.h"
bool IMG_isSVG(SDL_IOStream *src);

DESCRIPTION

This function attempts to determine if a file is a given filetype, reading the least amount possible from the SDL_IOStream (usually a few bytes).

There is no distinction made between "not the filetype in question" and basic i/o errors.

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.

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.

FUNCTION PARAMETERS

a seekable/readable SDL_IOStream to provide image data.

RETURN VALUE

Returns non-zero if this is SVG data, zero otherwise.

AVAILABILITY

This function is available since SDL_image 3.0.0.

SEE ALSO

(3), IMG_isAVIF(3), (3), IMG_isICO(3), (3), IMG_isCUR(3), (3), IMG_isBMP(3), (3), IMG_isGIF(3), (3), IMG_isJPG(3), (3), IMG_isJXL(3), (3), IMG_isLBM(3), (3), IMG_isPCX(3), (3), IMG_isPNG(3), (3), IMG_isPNM(3), (3), IMG_isQOI(3), (3), IMG_isTIF(3), (3), IMG_isXCF(3), (3), IMG_isXPM(3), (3), IMG_isXV(3), (3), IMG_isWEBP(3)

SDL_image 3.1.0 SDL_image