mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Tests: add PNG palette decode/encode roundtrip
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user