@@ -96,15 +96,18 @@ internal static Task<CompareResult> Compare(double threshold, ErrorMetric metric
96
96
/// </summary>
97
97
public static void ImageMagickComparer ( this VerifySettings settings , double threshold = .005 , ErrorMetric metric = ErrorMetric . Fuzz ) =>
98
98
settings . UseStreamComparer (
99
- ( received , verified , _ ) => Compare ( threshold , metric , received , verified ) ) ;
99
+ ( received , verified , _ ) => Compare ( threshold , metric , received , verified ) ,
100
+ extensions : [ "png" , "jpg" , "bmp" , "tiff" ] ) ;
100
101
101
102
/// <summary>
102
103
/// Helper method that calls <see cref="RegisterPdfToPngConverter"/> and
103
104
/// <see cref="RegisterComparers"/>(threshold = .005, metric = ErrorMetric.Fuzz)
104
105
/// </summary>
105
- public static SettingsTask ImageMagickComparer ( this SettingsTask settings , double threshold = .005 , ErrorMetric metric = ErrorMetric . Fuzz ) =>
106
- settings . UseStreamComparer (
107
- ( received , verified , _ ) => Compare ( threshold , metric , received , verified ) ) ;
106
+ public static SettingsTask ImageMagickComparer ( this SettingsTask settings , double threshold = .005 , ErrorMetric metric = ErrorMetric . Fuzz )
107
+ {
108
+ settings . CurrentSettings . ImageMagickComparer ( threshold , metric ) ;
109
+ return settings ;
110
+ }
108
111
109
112
public static void RegisterComparer ( double threshold , ErrorMetric metric , string extension ) =>
110
113
VerifierSettings . RegisterStreamComparer (
@@ -133,7 +136,6 @@ static Task<CompareResult> Compare(double threshold, ErrorMetric metric, IMagick
133
136
""" ) ) ;
134
137
}
135
138
136
-
137
139
//
138
140
// static ImageInfo BuildInfo(MagickImage image) =>
139
141
// new()
@@ -165,4 +167,4 @@ static Task<CompareResult> Compare(double threshold, ErrorMetric metric, IMagick
165
167
// BlackPointCompensation = image.BlackPointCompensation,
166
168
// AnimationTicksPerSecond = image.AnimationTicksPerSecond
167
169
// };
168
- }
170
+ }
0 commit comments