ImageEn, unit imageenio

TImageEnIO.LoadFromStreamBMP

TImageEnIO.LoadFromStreamBMP

Declaration

function LoadFromStreamBMP(Stream: TStream): Boolean;

Description

Load an image from a stream containing a BMP file. The result will be False if an error is encountered, e.g. the file in the stream is not BMP format (Aborting will be True).

Note: LoadFromStreamBMP does not reset the position of the stream, so you may need to first call Stream.Position := 0;
      

Example

// Load a BMP file with LoadFromStreamBMP
var
  fs: TFileStream;
begin
  fs := TFileStream.Create( 'C:\myfile.bmp', fmOpenRead );
  ImageEnView1.IO.LoadFromStreamBMP( fs );
  fs.Free();
end;