ImageEn, unit iexDBBitmaps

TIEDBMultiBitmap.InsertImage

TIEDBMultiBitmap.InsertImage


Declaration

procedure InsertImage(idx: integer); overload;
procedure InsertImage(Idx : integer; Bitmap : TIEBitmap); overload;
procedure InsertImage(Idx : integer; Bitmap : TIEBitmap; Rect: TRect); overload;
procedure InsertImage(Idx : integer; Bitmap : TBitmap); overload;
procedure InsertImage(Idx : integer; MBitmap : TIECustomMultiBitmap); overload;
procedure InsertImage(Idx : integer; Width, Height : integer; PixelFormat : TIEPixelFormat = ie24RGB); overload;
procedure InsertImage(Idx : integer; const FileName : string); overload;
procedure InsertImage(Idx : integer; Stream : TStream; FileFormat: TIOFileType = ioUnknown); overload;


Description

Inserts a new image into the database at position, idx (0 is the first). The table will be positioned at the new record.

Note:
- If Mode = dmRecordFrames, this method only insert a frame into the current image and does NOT update the database. You will need to call UpdateDatabaseImage
- TDataset.Insert and TDataset.Post will be called


Examples

// Prompt user to insert a new image into the database after the selected record
if dlgOpenImage.Execute then
  fDBMBitmap.InsertImage( ImageEnMView1.SelectedImage, dlgOpenImage.Filename );

// Compare the following...
ImageEnView1.IO.LoadFromFile('C:\000.tif');
MBitmap.InsertImage( 0 );
MyTable.Edit;
MBitmap.SetImage( -1, ImageEnView1.IEBitmap );
MyTable.Post;

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

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

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


See Also

- AppendImage
- SetImage