ImageEn, unit ImageEnIO

TImageEnIO.SaveToFilePNG

TImageEnIO.SaveToFilePNG

Declaration

procedure SaveToFilePNG(const FileName: WideString);

Description

Saves the current image to a file in PNG format.
FileName is the file name including extension.


Note:
◼If an internal save error is encountered Aborting will return True. Saving issues due to insufficient write permissions and disk write failures will raise an exception.
◼To abort while saving set Aborting to True
◼You can use SyncAlphaChannel to optimize the file before saving (by removing any content that is hidden by the alpha channel)

Example

Also see: Automated Samples
// Set best compression
ImageEnView1.IO.Params.PNG_Filter := ioPNG_Filter_Paeth;
ImageEnView1.IO.Params.PNG_Compression := 9;
// Save PNG
ImageEnView1.IO.SaveToFilePNG('D:\max.png');