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

Notes:
- 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 and PSD format
- SVG is an export only format. ImageEn does not support loading of SVG files


Example


// Save current layers (compress image layers as jpeg)
ImageEnView1.IO.Params.SVG_ImageCompression := ioJPEG;
ImageEnView1.IO.SaveToStreamSVG( Stream );


See Also


- SVG_ImageCompression
- SaveToFileSVG