Available in the LEADTOOLS Imaging toolkit. |
HSV_SfromRGB method (Main Control)
Visual Basic
example
Visual
C++ 4.0 example
Syntax short HSV_SfromRGB (OLE_COLOR cr);
Overview: Refer to Changing Brightness and Contrast.
Remarks
Returns the corresponding Saturation (S) of a standard Windows COLORREF (OLE_COLOR).
Saturation is the amount of "white" in a color. A saturation of 0 contains the most white and a saturation of 255 contains no white.
The standard Windows values for COLORREF(OLE_COLOR) represent either red, green, and blue color values, or an index into the bitmap's palette. A COLORREF value with the format 0x00BBGGRR represents the blue, green, and red color values for the specified pixel, where 0xBB is the blue value, 0xGG is the green value and 0xRR is the red value. If 0x01000000 is set in the COLORREF value (0x010000ZZ), the lower 8 bits (0xZZ) represent an index into the bitmap's palette, which holds the color value. You can specify a COLORREF value (the return value of the RGB function), or you can specify a palette index as explained in Using Palette Indexes as Color Values. Please note that just because an image has a palette, does not mean the value returned by this property is a palette index.
See Also
Elements: HSV_HfromRGB method, HSV_VfromRGB method, RGBfromHSV method
Topics: Raster
Images: Doing Color Space Conversions
Creating and Using a Bitmap Region