Accord.Imaging.ImageStatisticsYCbCr.CheckMaskProperties C# (CSharp) Method

CheckMaskProperties() private static method

private static CheckMaskProperties ( PixelFormat maskFormat, Size maskSize, Size sourceImageSize ) : void
maskFormat PixelFormat
maskSize System.Drawing.Size
sourceImageSize System.Drawing.Size
return void
        private static void CheckMaskProperties(PixelFormat maskFormat, Size maskSize, Size sourceImageSize)
        {
            if (maskFormat != PixelFormat.Format8bppIndexed)
                throw new ArgumentException("Mask image must be 8 bpp grayscale image.");

            if ((maskSize.Width != sourceImageSize.Width) || (maskSize.Height != sourceImageSize.Height))
                throw new ArgumentException("Mask must have the same size as the source image to get statistics for.");
        }
    }