ImageEn, unit imageenview




procedure LayersConvertToImageLayers(LayerIdx: Integer = LYR_SELECTED_LAYERS; QualityFactor: Double = 2; CropAlpha: Boolean = True; ConvertImages: Boolean = False);


Changes the type of the specified layer to TIEImageLayer.
This will change it from a vector-based layer to a standard bitmap layer. Bitmap layers can be edited using standard image modification features, but the quality will be lost if you resize the layer.
QualityFactor determines the size that the layer bitmap is created. A QualityFactor of 1 will create the bitmap at the current display size, whereas a QualityFactor of 2 would create it at double the display size (allowing it to be zoomed up 200% without loss of quality).
If CropAlpha is true, then it remove any alpha from the edges of the layer.
ConvertImages affects only image layers. By default image layers are ignored, if ConvertImages is true, the layer rotated images are fixed using LayersFixRotations and layer opacity is applied to the image.

- For text layers, a QualityFactor of 1 usually works best
- To convert an individual layer, you can also use ConvertToImageLayer


// Convert all selected layers to image layers

// Convert the current layer to an image
ImageEnView1.LayersConvertToImageLayers( ImageEnView1.LayersCurrent );

// Which is the same as...

// Convert an image layer with 50% opacity to an image with 50% alpha
ImageEnView1.LayersAdd( ielkImage );
TIEImageLayer( ImageEnView1.CurrentLayer ).Bitmap.Read( 'D:\MyImage.jpeg' );
ImageEnView1.CurrentLayer.Opacity := 0.50;
ImageEnView1.LayersConvertToImageLayers( ImageEnView1.LayersCurrent, 2, True, True );