ImageEn, unit imageenio

TImageEnIO.SaveToFileWIC

TImageEnIO.SaveToFileWIC


Declaration

procedure SaveToFileWIC(const FileName: WideString; FileFormat: TIOFileType);


Description

Saves the current image to a file using TIEWICWriter.
Set FileFormat to a WIC supported encoder, e.g. ioDDS or ioJPEG

Note:
 Some WIC formats require installation of a codec from the Microsoft store
 See WIC_Save_FileTypes for a list of WIC supported saving types
 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


Examples

// Save an image to a DirectDraw Surface stream using WIC
ImageEnView1.IO.SaveToFileWIC( 'D:\image.dds', ioDDS );

// Save an image to a JPEG stream using WIC
ImageEnView1.IO.SaveToFileWIC( 'D:\image.jpeg', ioJPEG );


See Also

 SaveToStreamWIC
 LoadFromFileWIC
 WIC_Save_FileTypes