ColorValueConversion2 Method
Syntax
CWIMAQVision.ColorValueConversion2 SourceColorFormat, SourcePlane1, SourcePlane2, SourcePlane3, DestColorFormat, DestPlane1, DestPlane2, DestPlane3 [, Options]
Return Type
On success, this method returns 0. On failure, this method returns a negative number.
Purpose
Maps the value of a color in one color mode into the value of the same color in another color mode.
Parameters
SourceColorFormat As CWIMAQColorFormats
The source color space used for the operation.
SourcePlane1 As Double
The red or hue value of the source pixel.
SourcePlane2 As Double
The green or saturation value of the source pixel.
SourcePlane3 As Double
The blue, light, value, or intensity value of the pixel.
DestColorFormat As CWIMAQColorFormats
The destination color space used for the operation.
DestPlane1 As Double
On return, the red, hue, L, or X value of the destination pixel.
DestPlane2 As Double
On return, the green, saturation, a, or Y value of the destination pixel.
DestPlane3 As Double
On return, the blue, light, value, intensity, b, or Z value of the destination pixel.
Options As Variant
[Optional] A CWIMAQColorValueConversionOptions object that indicates the options to use while doing this conversion.
Example
Dim hue As Double Dim saturation As Double Dim luminance As Double 'Find the HSL values equivalent to RGB color (128, 128, 128) CWIMAQVision1.ColorValueConversion2 cwimaqColorFormatRGB, _ 128, 128, 128, _ cwimaqColorFormatHSL, _ hue, saturation, luminance