TImageEnIO.LoadFromStreamWIC
Declaration
function LoadFromStreamWIC(Stream: TStream; FileFormat: TIOFileType = ioUnknown): Boolean;
Description
Loads an image from a stream using
TIEWICReader. The result will be false if an error is encountered, e.g. the file in the stream is not a compatible format (
Aborting will be true).
Set
FileFormat to use a specific decoder, otherwise use ioUnknown to automatically select a decoder.
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
◼LoadFromStreamWIC does not reset the position of the stream, so you may need to first call Stream.Position := 0;
◼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.LoadFromStreamWIC( fs, ioRAW );
See Also
◼LoadFromFileWIC
◼SaveToStreamWIC
◼WIC_Load_FileTypes
◼WIC_FileTypes