ImageEn, unit iemview

TImageEnMView.InsertImage

TImageEnMView.InsertImage


Declaration


procedure InsertImage(idx: integer);
procedure InsertImage(Idx : integer; Bitmap : TIEBitmap);
procedure InsertImage(Idx : integer; Bitmap : TBitmap);
procedure InsertImage(Idx : integer; Width, Height : integer; PixelFormat : TIEPixelFormat = ie24RGB);
procedure InsertImage(Idx : integer; const FileName : string);
procedure InsertImage(const FileName: String;
                      LoadOnDemand : boolean;
                      DefaultTopText : TIEImageEnMViewDefaultText = iedtNone;
                      DefaultInfoText : TIEImageEnMViewDefaultText = iedtNone;
                      DefaultBottomText : TIEImageEnMViewDefaultText = iedtFilename;
                      bSelectIt : Boolean = true);
procedure InsertImage(Idx : integer; Stream : TStream; FileFormat: TIOFileType = ioUnknown);


Description


Inserts a new image at position, idx (0 is the first).

Note: First overload, InsertImage(idx: integer), doesn't create the bitmap.

The parameters for the final overload are as follows:
Parameter Description
Filename A file or folder available on the system, or an HTTP or FTP link to a remote file
LoadOnDemand If True, the image will not be loaded from disk until it is displayed (i.e. when it is scrolled into view)
DefaultTopText Specify the text that is applied to ImageTopText
DefaultInfoText Specify the text that is applied to ImageInfoText
DefaultBottomText Specify the text that is applied to ImageBottomText (defaults to the filename)
bSelectIt The new image will be selected in the control



Examples


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

// Which is the same as...
ImageEnMView1.InsertImage(0, 'C:\000.tif');

// Insert 256 x 256 bitmap
ImageEnMView1.InsertImage(0, 256, 256, ie24RGB);

// Insert a file from the web
ImageEnMView1.InsertImage(0, 'http://www.imageen.com/graphics/imageen.gif');

// Show the first ten frames of a video file
for I := 0 to 9 do
  ImageEnMView1.InsertImage( I, 'D:\Temp\Cement.avi' + IEM_Path_Index_Delimiter + IntToStr( I * 10 ));

// Insert an image from a stream (letting ImageEn automatically detect the format)
ImageEnMView1.InsertImage( 0, MemStream, ioUnknown );


See Also


- InsertImageEx
- AppendImage
- FillFromList
- FillFromDirectory