This method layers two raster images together.

[C++Builder]   [ bool = ]imagekitcontrolname->Effect->LayerImage(NatveUInt Handle1, NatveUInt Handle2, short Trans, bool TransColor, short TRed, short TGreen, short TBlue, short BRed, short BGreen, short BBlue, int x, int y, bool Clip)
[Delphi]   [ Boolean = ]imagekitcontrolname.Effect.LayerImage(Handle1, Handle2: THandle; Trans: Smallint; TransColor: Boolean; TRed, TGreen, TBlue, BRed, BGreen, BBlue: Smallint; x, y: Integer; Clip: Boolean)

Parameters

Name Explanation
Handle1 The handle of the image on which another image is layered. (The image on the bottom) Supports 1, 4, 8, 16, 24, 32 bit images.
Handle2 The handle of the image to be layered. (The image on the top) Supports 1, 4, 8, 16, 24, 32 bit images.
Trans The level of transparency of Handle2 (From 0 to 255, as this value increases the image of Handle2 becomes visible)
TransColor Sets whether or not Handle2 has a transparent color. (False(0): No transparent color, True(non zero): Has transparent color)
TRed Sets the red component of the RGB value of the transparent color for Handle2 (from 0 to 255)
TGreen Sets the green component of the RGB value of the transparent color for Handle2 (from 0 to 255)
TBlue Sets the blue component of the RGB value of the transparent color for Handle2 (from 0 to 255)
BRed Sets the red component of the RGB value of the background color (from 0 to 255) This is the area of the image that is not part of either Handle1 or Handle2
BGreen Sets the green component of the RGB value of the background color (from 0 to 255) This is the area of the image that is not part of either Handle1 or Handle2
BBlue Sets the blue component of the RGB value of the background color (from 0 to 255) This is the area of the image that is not part of either Handle1 or Handle2
x,y The coordinates of the attachment location (in pixels)
Clip Sets whether or not the image is clipped. (False(0): No clipping, True(nonzero) clipping)

Return Value

Returns True if successful, otherwise returns False.

Explanation

The LayerImage method layers two raster images together. The upper left corner of the Handle2 image is attached to the Handle1 image at the x,y coordinate location.

If the Clip parameter is set to True (nonzero), the size of the created image is the same as the image of Handle 1. Any portions of the Handle2 image that extend beyond the Handle1 image will be clipped. If the Clip parameter is set to False(0), the size of the created image is the same as the combination of the two images. Any areas of the created image that are not in either the Handle1 image or the Handle2 image will be the color set in the BRed, BGreen, and BBlue parameters. If the TransColor parameter is set to True, the color set by the TRed, TGreen, and TBlue parameters will be a transparent color.

When the LayerAlphaChannel property is True, the Handle2 raster image must be a 32-bit RGBA image (A refers to an alpha channel containing a mask image). Note: When the LayerAlphaChannel property is True, the Trans parameter is disabled.

If successful the resulting raster image data is set in the LayerNo property (the ImageHandle property or the Layer(LayerNo).ImageHandle property. If unsuccessful, 0 is returned.

Note: The memory blocks of the input images are not freed after this method is executed.

An explanation of the output bitcounts:

When the Caption, Message, and ButtonName properties are blank, the progress dialog box will not be displayed. When the progress dialog box is displayed, the percentage that the processing has completed will be shown in the dialog box.

The LayerImage method replaces the Effect Control's Layer method in earlier versions of the ImageKit

The ImageKit10 VCL is a product created by Newtone Corporation