Declaration
procedure SaveToFileSVG(const FileName: WideString);
Description
Saves the current image to a file in Scalable Vector Graphics format. SVG is a vector format that can be displayed be web browsers.
If the TImageEnIO is
connected to an TImageEnView, then each of the
Layers will be output as a scalable object. If connected to a TImageEnVect, the objects will be
converted to layers and then output. Otherwise the
IEBitmap is output as SVG with an embedded raster image.
FileName is the file name including extension.
SVG Exporting Limitations:
◼Gradient fills are not supported at this time
◼Mask layers are not supported
Note:
◼If an internal save error is encountered
Aborting will return true (e.g. there are no valid layers). Saving issues due to insufficient write permissions and disk write failures will raise an exception.
◼Embedded images will be saved in the format specified by
SVG_ImageCompression.
◼You can also save layers in
IEN,
PSD and
PDF format
◼SVG is an export only format. ImageEn does not support loading of SVG files
◼To abort while saving set
Aborting to true
| Demos\LayerEditing\Layers_AllTypes\Layers.dpr |
// Save current layers (compress transparent image layers as PNG, others as JPEG)
ImageEnView1.IO.Params.SVG_ImageCompression := -1;
ImageEnView1.IO.Params.JPEG_Quality := 80;
ImageEnView1.IO.SaveToFileSVG( 'D:\layers.SVG' );
// Save current layers (compress image layers as jpeg)
ImageEnView1.IO.Params.SVG_ImageCompression := ioJPEG;
ImageEnView1.IO.Params.JPEG_Quality := 80;
ImageEnView1.IO.SaveToFileSVG( 'D:\layers.SVG' );
See Also
◼SVG_ImageCompression
◼SaveToStreamSVG