ImageEn, unit iexBitmaps

TIEBitmap.LoadFromBuffer

TIEBitmap.LoadFromBuffer

Declaration

function LoadFromBuffer(Buffer: Pointer; BufferSize: Integer; FileType: TIOFileType = ioUnknown): Boolean;

Description

Load an image from a buffer (of any format supported by the TImageEnIO class).
FileType specifies the file format of the image. If ioUnknown is specified, the format is detected automatically by reading the image header (using FindStreamFormat).

Result will be False if the file is not a recognized file type. Other errors will raise an exception.

Note:
Alternatively, you can use the loading method of IO
For legacy reasons, LoadFromBuffer() is an alias of Read()

Example

if ImageEnView1.IEBitmap.LoadFromBuffer( buff, buffLen ) then
  ShowMessage('Load OK');

See Also

LoadFromFile
LoadFromStream
Filename
WicFastLoading
IO