public static void VerifySimilarityIgnoreRegion <TPixelA, TPixelB>(
            this ImageComparer comparer,
            Image <TPixelA> expected,
            Image <TPixelB> actual,
            Rectangle ignoredRegion)
            where TPixelA : unmanaged, IPixel <TPixelA>
            where TPixelB : unmanaged, IPixel <TPixelB>
        {
            if (expected.Size() != actual.Size())
            {
                throw new ImageDimensionsMismatchException(expected.Size(), actual.Size());
            }

            if (expected.Frames.Count != actual.Frames.Count)
            {
                throw new ImageFramesMismatchException(expected.Frames.Count, actual.Frames.Count);
            }

            IEnumerable <ImageSimilarityReport <TPixelA, TPixelB> > reports = comparer.CompareImages(expected, actual);

            if (reports.Any())
            {
                var cleanedReports = new List <ImageSimilarityReport <TPixelA, TPixelB> >(reports.Count());
                foreach (ImageSimilarityReport <TPixelA, TPixelB> r in reports)
                {
                    IEnumerable <PixelDifference> outsideChanges = r.Differences.Where(
                        x =>
                        !(ignoredRegion.X <= x.Position.X &&
                          x.Position.X < ignoredRegion.Right &&
                          ignoredRegion.Y <= x.Position.Y &&
                          x.Position.Y < ignoredRegion.Bottom));

                    if (outsideChanges.Any())
                    {
                        cleanedReports.Add(new ImageSimilarityReport <TPixelA, TPixelB>(r.ExpectedImageFrame, r.ActualImageFrame, outsideChanges, null));
                    }
                }

                if (cleanedReports.Count > 0)
                {
                    throw new ImageDifferenceIsOverThresholdException(cleanedReports);
                }
            }
        }
        public static void VerifySimilarity <TPixelA, TPixelB>(
            this ImageComparer comparer,
            Image <TPixelA> expected,
            Image <TPixelB> actual)
            where TPixelA : unmanaged, IPixel <TPixelA>
            where TPixelB : unmanaged, IPixel <TPixelB>
        {
            if (expected.Size() != actual.Size())
            {
                throw new ImageDimensionsMismatchException(expected.Size(), actual.Size());
            }

            if (expected.Frames.Count != actual.Frames.Count)
            {
                throw new ImageFramesMismatchException(expected.Frames.Count, actual.Frames.Count);
            }

            IEnumerable <ImageSimilarityReport> reports = comparer.CompareImages(expected, actual);

            if (reports.Any())
            {
                throw new ImageDifferenceIsOverThresholdException(reports);
            }
        }