RanorexRanorex Documentation
ConvertRgbToGrayscaleImage Method (input, coeffR, coeffG, coeffB)
NamespacesRanorexImaging..::.ProcessingConvertRgbToGrayscaleImage(Bitmap, Double, Double, Double)
Converts a color to a grayscale image (bitmap format Format8bppIndexed) by calculating grayscale values according to the specified color component coefficients.
Declaration Syntax
C#Visual BasicVisual C++
public static Bitmap ConvertRgbToGrayscaleImage(
	Bitmap input,
	double coeffR,
	double coeffG,
	double coeffB
)
Public Shared Function ConvertRgbToGrayscaleImage ( _
	input As Bitmap, _
	coeffR As Double, _
	coeffG As Double, _
	coeffB As Double _
) As Bitmap
public:
static Bitmap^ ConvertRgbToGrayscaleImage(
	Bitmap^ input, 
	double coeffR, 
	double coeffG, 
	double coeffB
)
Parameters
input (Bitmap)
A color image.
coeffR (Double)
The coefficient for the red color component.
coeffG (Double)
The coefficient for the green color component.
coeffB (Double)
The coefficient for the blue color component.
Return Value
A grayscale image.
Exceptions
ExceptionCondition
ArgumentNullExceptionIf input is null.
ArgumentExceptionIf 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) Version: 3.2.3.16825 (3.2.3.16825)