This method changes a raster image to gray.
Parameters
None
Return Value
Returns True if successful. Returns False if unsuccessful.
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 Image property or the Layer(LayerNumber).Image property. The value of the LayerNumber property will determine which image is processed. 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 the SetGray method is successful and the DestinationAsImageKitImage property is True, the resulting image will be set in the Image property or in the Layer(LayerNumber).Image property, according to the value set in the LayerNumber property.
If the SetGray method is successful and the DestinationAsImageKitImage property is False, the resulting image will be set in the DestinationImage property.