TImageEnIO.LoadFromStreamHeif
Declaration
function LoadFromStreamHeif(Stream: TStream): Boolean;
Description
Loads an image from a stream containing a Heif file.
The result will be False if an error is encountered, e.g. the file in the stream is not Heif format (
Aborting will be True).
The method used to load Heif files is specified by
ActiveHeifEngine.
Note:
◼Multiple frame Heif files are supported, specify the image to load using
ImageIndex
◼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
Example
var
fs: TFileStream;
begin
fs := TFileStream.Create( 'D:\myfile.heif', fmOpenRead );
if ImageEnView1.IO.LoadFromStreamHeif( fs ) = False then
ShowMessage('Not a Heif file!');
fs.Free();
end;
See Also
◼LoadFromFileHeif
◼SaveToFileHeif