Tests: add PNG palette decode/encode roundtrip

This commit is contained in:
Lovell Fuller
2021-11-23 14:19:47 +00:00
parent e1ba2a7fd8
commit 336856dfc2
3 changed files with 7 additions and 0 deletions

View File

@@ -128,6 +128,12 @@ describe('PNG', function () {
assert.strictEqual(alphaMeanAfter, alphaMeanBefore);
});
it('palette decode/encode roundtrip', () =>
sharp(fixtures.inputPngPalette)
.png({ effort: 1, palette: true })
.toBuffer()
);
it('Valid PNG libimagequant palette value does not throw error', function () {
assert.doesNotThrow(function () {
sharp().png({ palette: false });