ImageEn, unit iexDBBitmaps

TIEDBBitmap.LayerMode

TIEDBBitmap.LayerMode


Declaration

property LayerMode: TIEDBLayerMode;


Description

Allows you to load and save layers.

Value Description
ielmDisabled Layers are ignored (not loaded or saved)
ielmSaveLayers Layers are saved and loaded as IEN files
ielmSavePSD Layers are saved and loaded as PhotoShop files (Image layers only)
ielmImageEnAnnot Layers are saved and loaded as JPEG images with ImageEn annotations
ielmImagingAnnot Layers are saved and loaded as TIFF images with Wang annotations (not all layer types are supported)

Note:
Has no effect unless the TIEDBBitmap is specified as the external bitmap for a TImageEnView.
If this property is not ielmDisabled, it will override the value set for TIEDBBitmap.ImageFormat (with either ioIEN, ioPSD, ioJPEG, ioTIFF)
If you call SetExternalBitmap after setting LayerMode, you will need to reload the image to see the layers

Default: ielmDisabled


Demo

Demo  Demos\Database\DBDemo_Layers\DBDemoLayers.dpr


Example

procedure Tfmain.FormShow(Sender: TObject);
begin
  ... Open a database table ...

  fDBBitmap := TIEDBBitmap.create( dsImages, 'Image', 'Filename' );

  // Store layers in database too
  fDBBitmap.LayerMode := ielmSaveLayers;

  ImageEnView1.SetExternalBitmap( fDBBitmap );
end;