File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
tests/Magick.NET.Tests/MagickImageTests Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -209,23 +209,25 @@ public void ShouldReturnTheCorrectValueForEachErrorMetricForImageWithAlphaChanne
209
209
[ Fact ]
210
210
public void ShouldReturnTheCorrectValueForPhaseCorrelationErrorMetric ( )
211
211
{
212
- using var image = new MagickImage ( Files . Builtin . Logo ) ;
213
- image . Resize ( 64 , 64 ) ;
212
+ using var image = new MagickImage ( Files . ImageMagickICO ) ;
214
213
using var other = image . CloneAndMutate ( image => image . Rotate ( 180 ) ) ;
215
214
216
215
var result = image . Compare ( other , ErrorMetric . PhaseCorrelation ) ;
217
- Assert . InRange ( result , 0.1871 , 0.1872 ) ;
216
+ Assert . InRange ( result , 0.3225 , 0.3226 ) ;
218
217
}
219
218
220
219
[ Fact ]
221
220
public void ShouldReturnTheCorrectValueForPhaseCorrelationErrorMetricWithAlphaChannel ( )
222
221
{
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 ) ;
225
227
using var other = image . CloneAndMutate ( image => image . Rotate ( 180 ) ) ;
226
228
227
229
var result = image . Compare ( other , ErrorMetric . PhaseCorrelation ) ;
228
- Assert . InRange ( result , 0.0085 , 0.0086 ) ;
230
+ Assert . InRange ( result , - 0.0250 , - 0.0249 ) ;
229
231
}
230
232
}
231
233
}
You can’t perform that action at this time.
0 commit comments