Constructor
VipsImagesvgload
Declaration [src]
int
vips_svgload (
const char* filename,
VipsImage** out,
...
)
Description [src]
Optional arguments:
dpi
: %gdouble, render at this DPIscale
: %gdouble, scale render by this factorunlimited
: %gboolean, allow SVGs of any sizestylesheet
: %gchararray, custom CSS
Render a SVG file into a VIPS image. Rendering uses the librsvg library and should be fast.
Use dpi
to set the rendering resolution. The default is 72. You can also
scale the rendering by scale
.
This function only reads the image header and does not render any pixel data. Rendering occurs when pixels are accessed.
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.
See also: vips_image_new_from_file().
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:
VipsImage
Output 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.