ImageEn, unit iexBitmaps

TIEMultiBitmap.SetImage

TIEMultiBitmap.SetImage

Declaration

procedure SetImage(Index: Integer; srcImage: TIEBaseBitmap); overload;
procedure SetImage(Index: Integer; srcImage: TBitmap); overload;
procedure SetImage(Index: Integer; Width, Height: Integer; PixelFormat: TIEPixelFormat); overload;
function SetImage(Index: Integer; const FileName: WideString; SourceImageIndex: Integer = 0; FileType: TIOFileType = ioUnknown): Boolean; overload;
function SetImage(Index: Integer; Stream: TStream; SourceImageIndex: Integer = 0; FileType: TIOFileType = ioUnknown): Boolean; overload

Description

Sets the image assigned to Index.
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 FileType if it cannot be determined by the file extension or content.

Note: Do not use in IsVirtual mode.

Examples

ImageEnView1.IO.LoadFromFile('C:\000.tif');
MBitmap.InsertImage( 0 );
MBitmap.SetImage(0, ImageEnView1.IEBitmap);

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

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

Index := ImageEnMView1.AppendImage;
ImageEnMView1.SetImage(Index, 'http://www.imageen.com/image.jpg');