ImageEn, unit imageenview |
|
TImageEnView.LayersMergeTo
Declaration
procedure LayersMergeTo(Layer1, Layer2: integer; Destination: TIEBitmap);
Description
Merges Layer1 and Layer2 into a TIEBitmap object.
The new bitmap will inherit the
Layers[].
Transparency and alpha channels.
The resulting bitmap will always be 24 bit (ie24RGB).
Note:
◼If either layer is not a
TIEImageLayer, it will be
converted to a TIEImageLayer
◼LayersMergeTo can merge a layer with its own layer mask (to create a layer with the transparency of the mask).
◼LayersMergeFilter will specify the quality of image layers, if they do not have a custom
UseResampleFilter
// we want to get a background image and then merge over it another image in semitransparency.
ImageEnView.IO.LoadFromFile('C:\background.jpg');
ImageEnView.LayersAdd();
ImageEnView.IO.LoadFromFile('C:\foreground.jpg');
ImageEnView.Layers[1].Transparency := 128; // the second layer has 50% transparency
ImageEnView.LayersMergeTo(0, 1, ImageEnView2.IEBitmap);
ImageEnView2.IO.SaveToFile('C:\output.jpg');
// Show Layer 1 and 2 merged in another ImageEnView
ImageEnView1.LayersMergeTo( 1, 2, ImageEnView2.IEBitmap );
ImageEnView2.Update();
See Also
◼LayersMerge
◼LayersMergeAll
◼LayersMergeFilter
◼IELayersMerge
◼LayersSaveMergedTo