Allow use of embed with 1 and 2 channel images #411

This commit is contained in:
Lovell Fuller
2016-04-14 21:39:17 +01:00
parent 1b7c5816fc
commit e0d58266be
5 changed files with 37 additions and 7 deletions

View File

@@ -38,7 +38,7 @@ describe('Gamma correction', function() {
assert.strictEqual('jpeg', info.format);
assert.strictEqual(129, info.width);
assert.strictEqual(111, info.height);
fixtures.assertSimilar(fixtures.expected('gamma-3.0.jpg'), data, done);
fixtures.assertSimilar(fixtures.expected('gamma-3.0.jpg'), data, { threshold: 6 }, done);
});
});
@@ -49,7 +49,7 @@ describe('Gamma correction', function() {
.toBuffer(function(err, data, info) {
assert.strictEqual('png', info.format);
assert.strictEqual(320, info.width);
fixtures.assertSimilar(fixtures.expected('gamma-alpha.jpg'), data, done);
fixtures.assertSimilar(fixtures.expected('gamma-alpha.jpg'), data, { threshold: 11 }, done);
});
});