This property sets the transparent color in the image set in the Layer[LayerNo].ImageHandle property.

[C++Builder]   imagekitcontrolname->Layer[Index]->TransRed[= short ]
[Delphi]   imagekitcontrolname.Layer[Index].TransRed[= Smallint ]

* The index can range from 0 to 99

Reference

TransRed is the transparent color's red value. (Values range from 0 to 255. Default value is 0)

Explanation

The TransRed property sets the transparent color in the image set in the Layer[LayerNo].ImageHandle property. This property is useful when multiple image layers are displayed at the same time. When a transparent color is used, the next image layer below the transparent color will appear. The image where the transparent color is set must be 8 bit color or 24 bit color and is specified by the Layer[LayerNo].ImageHandle property. The default value is true. If a vector image is set in the base image, this property is disabled.

Example: Setting the transparent color to white

In Delphi

VImageKit1.Layer[0].TransBlue := 255;
VImageKit1.Layer[0].TransGreen := 255;
VImageKit1.Layer[0].TransRed := 255;
VImageKit1.Layer[0].Transparent := True;
VImageKit1.LayerNo := 0;
VImageKit1.FileIO.LoadFile(vikLoad);

Setting this value

This value can be set at run-time.

Retrieving this value

This value can be retrieved at run-time.

 

The ImageKit10 VCL is a product created by Newtone Corporation