ImageEn, unit iexBitmaps




procedure SetImage(idx: Integer; srcImage: TIEBaseBitmap); overload;
procedure SetImage(idx: Integer; srcImage: TBitmap); overload;
procedure SetImage(idx: Integer; width, height: Integer; PixelFormat: TIEPixelFormat); overload;
function SetImage(idx: integer; const FileName: WideString; SourceImageIndex: Integer = 0; FileFormat: TIOFileType = ioUnknown): boolean; overload;
function SetImage(idx: Integer; Stream: TStream; SourceImageIndex: Integer = 0; FileFormat: TIOFileType = ioUnknown): Boolean; overload


Sets the image assigned to index, idx.
With overloads 2 and 3 the srcImage bitmap is copied internally; therefore you can free srcImage after calling SetImage.
With overload 4 the image can be a local file or web page based image.
With overloads 3 and 4 use SourceImageIndex to specify the image index if the source file is a multi-frame file (such as a TIFF or AVI). You can also specify the FileFormat if it cannot be determined by the file extension or content.

Note: Do not use in IsVirtual mode.


MBitmap.InsertImage( 0 );
MBitmap.SetImage(0, ImageEnView1.IEBitmap);

idx := ImageEnMView1.AppendImage;
ImageEnMView1.SetImage(idx, stream);

idx := ImageEnMView1.AppendImage;
ImageEnMView1.SetImage(idx, 'D:\myfile.jpg');

idx := ImageEnMView1.AppendImage;
ImageEnMView1.SetImage(idx, '');