GdPicture.NET.14
GdPicture14 Namespace / GdPictureImaging Class / CountColor Method
GdPicture image identifier.
Color to count. A suitable color value can be obtained by using the ARGB() method.





In This Topic
CountColor Method (GdPictureImaging)
In This Topic
Counts the number of pixel that have a specific color on a GdPicture image or into an area of a GdPicture image defined by SetROI() method.
Syntax
'Declaration
 
Public Function CountColor( _
   ByVal ImageID As Integer, _
   ByVal PickColor As Color _
) As Double
public double CountColor( 
   int ImageID,
   Color PickColor
)
public function CountColor( 
    ImageID: Integer;
    PickColor: Color
): Double; 
public function CountColor( 
   ImageID : int,
   PickColor : Color
) : double;
public: double CountColor( 
   int ImageID,
   Color PickColor
) 
public:
double CountColor( 
   int ImageID,
   Color PickColor
) 

Parameters

ImageID
GdPicture image identifier.
PickColor
Color to count. A suitable color value can be obtained by using the ARGB() method.

Return Value

The number of pixel that match the color.
Remarks

This method requires the Image Documents component to run.

Use the GetStat() method to check if this method has completed successfully.
See Also