File tree Expand file tree Collapse file tree
tests/Magick.NET.Tests/MagickImageTests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -209,23 +209,25 @@ public void ShouldReturnTheCorrectValueForEachErrorMetricForImageWithAlphaChanne
209209 [ Fact ]
210210 public void ShouldReturnTheCorrectValueForPhaseCorrelationErrorMetric ( )
211211 {
212- using var image = new MagickImage ( Files . Builtin . Logo ) ;
213- image . Resize ( 64 , 64 ) ;
212+ using var image = new MagickImage ( Files . ImageMagickICO ) ;
214213 using var other = image . CloneAndMutate ( image => image . Rotate ( 180 ) ) ;
215214
216215 var result = image . Compare ( other , ErrorMetric . PhaseCorrelation ) ;
217- Assert . InRange ( result , 0.1871 , 0.1872 ) ;
216+ Assert . InRange ( result , 0.3225 , 0.3226 ) ;
218217 }
219218
220219 [ Fact ]
221220 public void ShouldReturnTheCorrectValueForPhaseCorrelationErrorMetricWithAlphaChannel ( )
222221 {
223- using var image = new MagickImage ( Files . MagickNETIconPNG ) ;
224- image . Resize ( 64 , 64 ) ;
222+ var settings = new MagickReadSettings
223+ {
224+ FrameIndex = 1 ,
225+ } ;
226+ using var image = new MagickImage ( Files . WandICO , settings ) ;
225227 using var other = image . CloneAndMutate ( image => image . Rotate ( 180 ) ) ;
226228
227229 var result = image . Compare ( other , ErrorMetric . PhaseCorrelation ) ;
228- Assert . InRange ( result , 0.0085 , 0.0086 ) ;
230+ Assert . InRange ( result , - 0.0250 , - 0.0249 ) ;
229231 }
230232 }
231233}
You can’t perform that action at this time.
0 commit comments