Available in the LEADTOOLS Imaging toolkit. |
SetRgnColorRGBRange method (Main Control)
Visual
Basic example
Visual
C++ 4.0 example
Syntax short SetRgnColorRGBRange (OLE_COLOR crLower, OLE_COLOR crUpper, short iCombineMode);
Overview: Refer to Creating and Using a Bitmap Region.
Remarks
Creates or updates the bitmap region by adding a region that consists of all the pixels that fall in the range crLower ... crUpper, inclusively.
This method uses the RGB color model to set a region based on a color range.
To be added to the region a color must fall in the range crLower..crUpper. To set a region for all pure red, specify crLower and crUpper as follows:
crLower RGB(1,0,0)
crUpper(255,0,0)
Note that this would fail to include many colors that look red to the eye (like RGB(255,4,4)). To include ALL shades of red, you can use the SetRgnColorHSVRange method.
To update an existing region, you specify how the new region is to be combined with the existing one. For possible values, specified in the iCombineMode parameter, refer to Flags for Setting a Region
See Also
Elements: SetRgnColorHSVRange method, SetRgnColor method