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 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 LayerNumber property (the Image property or the Layer(LayerNumber).Image) property.