You are here: GdPicture.NET > Documentation > Classes > GdPictureImaging Class > GdPictureImaging Methods > Standalone Functions > CountColor Method
logo.gif
ContentsIndexHome
PreviousUpNext
GdPictureImaging.CountColor Method

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() function.

C#
public Double CountColor(
    int ImageID, 
    Color PickColor
);
Visual Basic
Public Function CountColor(
    ByVal ImageID As Integer, 
    ByVal PickColor As Color
) As Double
Parameters
Parameters 
Description 
ImageID 
GdPicture Image Identifier.  
PickColor 
Color Object. You can build a Color Object using the ARGB() function. Color to count.  
Returns

The number of pixel that match the color.

Use the GetStat() function to check if this function has completed successfully.

What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.