---
name: "IMG_LoadSizedSVG_IO"
section: "3"
platform: "linux"
package: "libsdl3-image-doc"
version: "3.2.4+ds-1+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/IMG_LoadSizedSVG_IO"
---

# IMG\_LoadSizedSVG\_IO(3)

Load an SVG image, scaled to a specific size.

## NAME

IMG\_LoadSizedSVG\_IO - Load an SVG image, scaled to a specific size.

## HEADER FILE

Defined in SDL3\_image/SDL\_image.h

## SYNOPSIS

```
#include "SDL3_image/SDL_image.h"
```

**SDL\_Surface \* IMG\_LoadSizedSVG\_IO(SDL\_IOStream \*src, int width, int height);**

## DESCRIPTION

Since SVG files are resolution-independent, you specify the size you would like the output image to be and it will be generated at those dimensions.

Either width or height may be 0 and the image will be auto-sized to preserve aspect ratio.

When done with the returned surface, the app should dispose of it with a call to SDL\_DestroySurface().

## FUNCTION PARAMETERS

- *src*

  an SDL\_IOStream to load SVG data from.

- *width*

  desired width of the generated surface, in pixels.

- *height*

  desired height of the generated surface, in pixels.

## RETURN VALUE

Returns a new SDL surface, or NULL on error.

## AVAILABILITY

This function is available since SDL\_image 3.0.0.
