public static IEnumerable <ImageSimilarityReport <TPixelA, TPixelB> > CompareImages <TPixelA, TPixelB>( this ImageComparer comparer, Image <TPixelA> expected, Image <TPixelB> actual) where TPixelA : unmanaged, IPixel <TPixelA> where TPixelB : unmanaged, IPixel <TPixelB> { var result = new List <ImageSimilarityReport <TPixelA, TPixelB> >(); if (expected.Frames.Count != actual.Frames.Count) { throw new Exception("Frame count does not match!"); } for (int i = 0; i < expected.Frames.Count; i++) { ImageSimilarityReport <TPixelA, TPixelB> report = comparer.CompareImagesOrFrames(expected.Frames[i], actual.Frames[i]); if (!report.IsEmpty) { result.Add(report); } } return(result); }
public static ImageSimilarityReport <TPixelA, TPixelB> CompareImagesOrFrames <TPixelA, TPixelB>( this ImageComparer comparer, Image <TPixelA> expected, Image <TPixelB> actual) where TPixelA : struct, IPixel <TPixelA> where TPixelB : struct, IPixel <TPixelB> { return(comparer.CompareImagesOrFrames((ImageFrame <TPixelA>)expected, (ImageFrame <TPixelB>)actual)); }
public static ImageSimilarityReport <TPixelA, TPixelB> CompareImagesOrFrames <TPixelA, TPixelB>( this ImageComparer comparer, Image <TPixelA> expected, Image <TPixelB> actual) where TPixelA : unmanaged, IPixel <TPixelA> where TPixelB : unmanaged, IPixel <TPixelB> { return(comparer.CompareImagesOrFrames(expected.Frames.RootFrame, actual.Frames.RootFrame)); }