ImageEn, unit imageenio

TImageEnIO.LoadFromStreamBMP

TImageEnIO.LoadFromStreamBMP


Declaration

function LoadFromStreamBMP(Stream: TStream): Boolean;


Description

     Loads 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:
If StreamHeaders property is True, the stream must have a special header (saved with SaveToStreamBMP)
LoadFromStreamBMP does not reset the position of the stream, so you may need to first call Stream.Position := 0;
      

Example

// loads a BMP file with LoadFromStreamBMP
var
  fs: TFileStream;
Begin
  fs := TFileStream.Create('C:\myfile.bmp', fmOpenRead);
  ImageEnView1.IO.LoadFromStreamBMP(fs);
  fs.free;
End;