// General Append (blank image) procedure AppendImage(); overload;
// General Append (blank image of specific size and color depth) procedure AppendImage(Width, Height: integer; PixelFormat: TIEPixelFormat = ie24RGB); overload;
// Append from TIEBitmap source procedure AppendImage(Bitmap: TIEBitmap); overload;
// Append from TBitmap source procedure AppendImage(Bitmap: TBitmap); overload;
Adds a new image at last position in the list and returns the new image position.
Note: ◼First overload of AppendImage() does NOT create the bitmap. You can initialize an empty bitmap with AppendImage( 0,0,ie24RGB ) ◼With TIEBitmap overload, the source bitmap may be modified ◼The added image will become selected. To prevent selection add iemoDontSelectOnAdd to MultiSelectionOptions
The parameters for the final overload are as follows:
Parameter
Description
Filename
The full path to a file or folder available on the system, or an HTTP or FTP link to a remote file. You can load a particular frame from a multi-frame image or video by delimiting it with IEM_Path_Index_Delimiter
LoadOnDemand
If True, the image will not be loaded from disk until it is displayed (i.e. when it is scrolled into view)
// Append a file from the web ImageEnMView1.AppendImage( 'http://www.imageen.com/graphics/imageen.gif' );
// Show the first ten frames of a video file for i := 0 to 9 do ImageEnMView1.AppendImage( 'D:\Temp\Cement.avi', i );
// Append an image from a stream (letting ImageEn automatically detect the format) ImageEnMView1.AppendImage( MemStream, ioUnknown );
// Append all pages of a TIFF to the current content (will load on demand) pageCount := EnumTIFFIm( sFileName ); for i := 0 to pageCount - 1 do ImageEnMView1.AppendImage( sFileName, i );
// Fill the grid with the content of a TFileListBox procedure TForm1.FileListBox1Change(Sender: TObject); var i: Integer; begin ImageEnFolderMView1.Clear(); for i := 0 to FileListBox1.Items.Count - 1 do ImageEnFolderMView1.AppendImage( IEAddBackSlash(FileListBox1.Directory) + FileListBox1.Items[i], true ); end;
// Append a JPEG that is Base64 encoded ms := TMemoryStream.Create(); try IEDecode64( SourceStream, ms); ms.Position := 0; ImageEnMView1.AppendImage( ms, ioJPEG ); finally ms.Free(); end;
// Create an animated GIF file from ten source images ImageEnMView1.Clear; for i := 0 to 9 do begin ImageEnMView1.AppendImage( format( 'D:\Source\Frame %d.bmp', [i] )); ImageEnMView1.MIO.Params[i].GIF_DelayTime := 10; // Display each frame for 1/10th of a second end; ImageEnMView1.MIO.SaveToFileGIF( 'D:\Animated.gif' );