public void DetectEdges_WorksWithAllFilters <TPixel>(TestImageProvider <TPixel> provider, EdgeDetectionOperators detector) where TPixel : struct, IPixel <TPixel> { using (Image <TPixel> image = provider.GetImage()) { image.Mutate(x => x.DetectEdges(detector)); image.DebugSave(provider, detector.ToString()); image.CompareToReferenceOutput(ValidatorComparer, provider, detector.ToString()); } }
public void DetectEdges_WorksWithAllFilters <TPixel>(TestImageProvider <TPixel> provider, EdgeDetectionOperators detector) where TPixel : unmanaged, IPixel <TPixel> { bool hasAlpha = provider.SourceFileOrDescription.Contains("TestPattern"); ImageComparer comparer = hasAlpha ? TransparentComparer : OpaqueComparer; using (Image <TPixel> image = provider.GetImage()) { image.Mutate(x => x.DetectEdges(detector)); image.DebugSave(provider, detector.ToString()); image.CompareToReferenceOutput(comparer, provider, detector.ToString()); } }