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 GdPictureColor _
) As Double
public double CountColor( 
   int ImageID,
   GdPictureColor PickColor
)
public function CountColor( 
    ImageID: Integer;
    PickColor: GdPictureColor
): Double; 
public function CountColor( 
   ImageID : int,
   PickColor : GdPictureColor
) : double;
public: double CountColor( 
   int ImageID,
   GdPictureColor PickColor
) 
public:
double CountColor( 
   int ImageID,
   GdPictureColor 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