TImageEnIO.LoadFromFileWIC
Declaration
function LoadFromFileWIC(const FileName: WideString; FileFormat: TIOFileType = ioUnknown): Boolean;
Description
Loads an image from a WIC file using
TIEWICReader.
Set
FileFormat to use a specific decoder, otherwise use ioUnknown to automatically select a decoder.
FileName is the file name including extension.
Result will be false if the file is not a compatible format (and
Aborting will be true). Loading errors due to a file not being available will raise an exception.
Note:
◼Some WIC formats require installation of a codec from the Microsoft store
◼See
WIC_Load_FileTypes for a list of WIC supported file types
◼You can abort loading by setting
Aborting to true
◼If
NativePixelFormat = True, the image will be returned in ie32RGB format with alpha in the
A channel
// Load a raw camera file using WIC
ImageEnView1.IO.LoadFromFileWIC( 'D:\image.nef', ioRAW );
See Also
◼LoadFromStreamWIC
◼SaveToFileWIC
◼WIC_Load_FileTypes
◼WIC_FileTypes
◼WICFileTypes