System.Drawing.PixelData.GetIntensity C# (CSharp) Method

GetIntensity() public method

Gets the luminance intensity of the pixel based on the values of the red, green, and blue components. Alpha is ignored.
public GetIntensity ( ) : double
return double
        public double GetIntensity()
        {
            return ((0.114 * (double)B) + (0.587 * (double)G) + (0.299 * (double)R)) / 255.0;
        }