ImageEn, unit imageenview

TImageEnView.LayersFixBorders

TImageEnView.LayersFixBorders


Declaration

procedure LayersFixBorders(LayerIndex: Integer = LYR_ALL_LAYERS);


Description

Removes the transparent border around the bitmap of a layer, which typically occurs after multiple rotations.
The index of a specific layer can be specified, or LYR_ALL_LAYERS (-3) to process all layers, or LYR_SELECTED_LAYERS (-2) to process selected layers.

Note: This can be called automatically using loAutoFixBorders of LayerOptions


Example

// Remove border of top-most layer
ImageEnView1.LayersFixBorders( ImageEnView1.LayersCount - 1 );

// Remove border of all layers
ImageEnView1.LayersFixBorders( LYR_ALL_LAYERS );

// Remove border of selected layers
ImageEnView1.LayersFixBorders( LYR_SELECTED_LAYERS );