This method changes a raster image to gray.

[C++Builder]   [ bool = ]imagekitcontrolname->Effect->SetGray()
[Delphi]   [ Boolean = ]imagekitcontrolname.Effect.SetGray()

Parameters

None

Return Value

Returns True if successful, otherwise returns False.

Explanation

The SetGray method allows you to convert a raster image to gray.

To execute the SetGray method, set the image handle of the image in the ImageHandle property or the Layer(LayerNo).ImageHandle property. The SetGray method supports 1, 4, 8, 16, 24, and 32 bit images. Note: the SetGray method will convert a raster image to gray without changing the bitcount. A 24 bit color image, for example, is coverted to gray but is still 24 bit color. To change an image to 8-bit grayscale, please use the ConvertColor method.

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

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 ImageKit10 VCL is a product created by Newtone Corporation