| Extracted from Pike v7.8 release 866 at 2018-02-09.

[Top]
Image
Image.SVG

# Method Image.SVG.decode_header()

Method decode_header

  `mapping decode_header(string data, void|mapping options)`

Description

  Data is the SVG data, the charset must be unicode.

  If options is specified, it contains one or more of the following options

  `xsize : int` | If specified, gives the exact width in pixels the image will have. If only one of xsize or ysize is specified, the other is calculated.
  `ysize : int` | If specified, gives the exact height in pixels the image will have. If only one of xsize or ysize is specified, the other is calculated.
  `scale : float` | If specified, gives the scale the image will be drawn with. A scale of 2.0 will give an image that is twice as large.

  The result is a mapping with the following members:

  `type : string` | Always image/svg
  `xsize : int` | The width of the image, in pixels
  `ysize : int` | The height of the image, in pixels