Constructor
VipsImagesvgload
Declaration [src]
int
vips_svgload (
const char* filename,
VipsImage** out,
...
)
Description [src]
Render a SVG file into a VIPS image.
Use dpi to set the rendering resolution (default 72). Rendering resolution
affects the number of output pixels if the SVG viewBox has dimensions
specified in physical units, like mm. If the SVG has viewBox dimensions
in pixels, then dpi will only change the output resolution metadata
(the xres / yres fields).
Use scale to scale the number of output pixels. This does not affect the
output resolution metadata.
SVGs larger than 10MB are normally blocked for security. Set unlimited to
allow SVGs of any size.
A UTF-8 string containing custom CSS can be provided via stylesheet.
During the CSS cascade, the specified stylesheet will be applied with a
User Origin. This feature requires librsvg 2.48.0 or later.
If high_bitdepth is set and the version of cairo supports it
(e.g. cairo >= 1.17.2), enable 128-bit scRGB output (32-bit per channel).
Optional arguments
dpi:gdouble, render at this DPIscale:gdouble, scale render by this factorunlimited:gboolean, allow SVGs of any sizestylesheet:gchararray, custom CSShigh_bitdepth:gboolean, enable scRGB 128-bit output
See also
This constructor is not directly available to language bindings.
Parameters
filename-
Type:
const char*File to load.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. out-
Type:
VipsImageOutput image.
The argument will be set by the function. The caller of the function takes ownership of the returned data, and is responsible for freeing it. ...-
Type:
NULL-terminated list of optional named arguments.