Converts a color to a grayscale image (bitmap format Format8bppIndexed).
| C# | Visual Basic | Visual C++ |
public static Bitmap ConvertRgbToGrayscaleImage( Bitmap input )
Public Shared Function ConvertRgbToGrayscaleImage ( input As Bitmap ) As Bitmap
public: static Bitmap^ ConvertRgbToGrayscaleImage( Bitmap^ input )
- input (Bitmap)
- A color image.
Bitmap
A grayscale image.
A grayscale image.
This method is equivalent to method ConvertRgbToGrayscaleImageY(Bitmap).
| Exception | Condition |
|---|---|
| ArgumentNullException | If input is null. |
| ArgumentException | If the input image cannot
be converted to Format24bppRgb pixel format (i.e. if
it is no color image in a 32 bit format). |
Assembly: Ranorex.Core (Module: Ranorex.Core.dll) Version: 4.0.4.23593 (4.0.4.23593)