UtilImageGetPixelColorPercentOfImage(String, Color) Method
Analyzes each pixel of the spcified image, counts all the pixels that are of same color as the color specified,
then calculates a percentage of the total grayscale presence in the image.
Namespace: DevCase.Core.Media.GraphicsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static double GetPixelColorPercentOfImage(
string filepath,
Color color
)
Public Shared Function GetPixelColorPercentOfImage (
filepath As String,
color As Color
) As Double
Dim filepath As String
Dim color As Color
Dim returnValue As Double
returnValue = UtilImage.GetPixelColorPercentOfImage(filepath,
color)
public:
static double GetPixelColorPercentOfImage(
String^ filepath,
Color color
)
static member GetPixelColorPercentOfImage :
filepath : string *
color : Color -> float
No code example is currently available or this language may not be supported.
- filepath String
-
The image file path.
- color Color
-
The color.
Double
The resulting percentage of pixels in the source image that are of same color as the color specified.
This is a code example.
No code example is currently available or this language may not be supported.
Dim filepath As String = "C:\Image.jpg"
Dim color As Color = Color.FromArgb(255, 255, 255, 255)
Dim percent As Double = GetGrayScalePixelPercentOfImage(filepath, color)
Dim strFormat As String = String.Format("{0:F2}%", percent)
Console.WriteLine(strFormat)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.