BCH.BCHTool.GetL8 C# (CSharp) Méthode

GetL8() private méthode

private GetL8 ( Color c ) : byte
c Color
Résultat byte
        private byte GetL8(Color c)
        {
            byte red = c.R;
            byte green = c.G;
            byte blue = c.B;
            // Luma (Y’) = 0.299 R’ + 0.587 G’ + 0.114 B’ from wikipedia
            return (byte)(((0x4CB2 * red + 0x9691 * green + 0x1D3E * blue) >> 16) & 0xFF);
        }