mirror of
https://github.com/danbulant/pngjs
synced 2026-06-19 14:31:44 +00:00
For now, set a 16 tolerance on 16bit images because of gamma issue and a tolerance of 1 on the 2.2 8bit gamma correction test.
This commit is contained in:
parent
cb346c5685
commit
8933a9048d
1 changed files with 8 additions and 2 deletions
|
|
@ -226,11 +226,17 @@
|
|||
if (asyncImage.height === 0 || syncImage.height === 0) {
|
||||
success = false;
|
||||
} else {
|
||||
var equal = imagediff.equal(inImage, asyncImage, 2);
|
||||
var tolerance = 0;
|
||||
if (inImage.src.match(/16\.png/)) {
|
||||
tolerance = 16;
|
||||
} else if (inImage.src.match(/g04n2c08/)) {
|
||||
tolerance = 1;
|
||||
}
|
||||
var equal = imagediff.equal(inImage, asyncImage, tolerance);
|
||||
if (!equal) {
|
||||
success = false;
|
||||
}
|
||||
equal = imagediff.equal(inImage, syncImage, 2);
|
||||
equal = imagediff.equal(inImage, syncImage, tolerance);
|
||||
if (!equal) {
|
||||
success = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue