Fix 16-bit, 2-channel PNG w/ ICC profile support #2013

This commit is contained in:
Lovell Fuller
2019-12-20 17:19:33 +00:00
parent 703d90e663
commit 755a0caf3d
6 changed files with 20 additions and 1 deletions

View File

@@ -103,6 +103,15 @@ describe('PNG', function () {
});
});
it('16-bit grey+alpha PNG identity transform', function () {
const actual = fixtures.path('output.16-bit-grey-alpha-identity.png');
return sharp(fixtures.inputPng16BitGreyAlpha)
.toFile(actual)
.then(function () {
fixtures.assertMaxColourDistance(actual, fixtures.expected('16-bit-grey-alpha-identity.png'));
});
});
it('Valid PNG libimagequant palette value does not throw error', function () {
assert.doesNotThrow(function () {
sharp().png({ palette: false });