private static byte[] CalculateLuminance(IMagickImage src)
 {
     if (src == null)
     {
         throw new ArgumentNullException(nameof(src));
     }
     if (src.BitDepth() < 8)
     {
         src.BitDepth(8);
     }
     return(src.ToByteArray(MagickFormat.Gray));
 }
Beispiel #2
0
        private static Byte[] CalculateLuminance(IMagickImage image)
        {
            if (image == null)
            {
                throw new ArgumentNullException(nameof(image));
            }

            if (image.BitDepth() < 8)
            {
                image.BitDepth(8);
            }

            return(image.ToByteArray(MagickFormat.Gray));
        }