ImageEn, unit imageenio

TImageEnIO.SaveToStreamSVG

TImageEnIO.SaveToStreamSVG


Declaration

procedure SaveToStreamSVG(Stream: TStream);


Description

Saves the current image to a stream 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.

SVG Exporting Limitations:
Gradient fills are not supported at this time
Mask layers are not supported


Note:
SVG_ImageCompression sets the image format for embedded raster images. It should be a web-safe format such as ioPNG or ioJPEG
If an internal save error is encountered Aborting will return true (e.g. there are no valid layers)
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


Examples

// 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.SaveToStreamSVG( Stream );


See Also

SVG_ImageCompression
SaveToFileSVG