UtilImageGetGrayScalePixelPercentOfImage(FileInfo, Int32) Method
Analyzes each pixel of the spcified image, counts all the pixels that are within the grayscale RGB range,
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 GetGrayScalePixelPercentOfImage(
FileInfo file,
int dimensionIndex
)
Public Shared Function GetGrayScalePixelPercentOfImage (
file As FileInfo,
dimensionIndex As Integer
) As Double
Dim file As FileInfo
Dim dimensionIndex As Integer
Dim returnValue As Double
returnValue = UtilImage.GetGrayScalePixelPercentOfImage(file,
dimensionIndex)
public:
static double GetGrayScalePixelPercentOfImage(
FileInfo^ file,
int dimensionIndex
)
static member GetGrayScalePixelPercentOfImage :
file : FileInfo *
dimensionIndex : int -> float
No code example is currently available or this language may not be supported.
- file FileInfo
-
The image file.
- dimensionIndex Int32
-
The index of the image dimension to analyze.
Double
The resulting percentage of grayscale pixels in the source image.
This is a code example.
No code example is currently available or this language may not be supported.
Dim file As New FileInfo("C:\Image.jpg")
Dim percent As Double = GetGrayScalePixelPercentOfImage(file, dimensionIndex:=0)
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.