Ensure linear op works with 16-bit input #3605

This commit is contained in:
Lovell Fuller
2023-04-01 12:08:14 +01:00
parent 97cf69c26a
commit b9c3851515
4 changed files with 16 additions and 2 deletions

View File

@@ -51,6 +51,16 @@ describe('Linear adjustment', function () {
});
});
it('applies linear levels adjustment to 16-bit w alpha ch', function (done) {
sharp(fixtures.inputPngWithTransparency16bit)
.linear(a, b)
.png({ compressionLevel: 0 })
.toBuffer(function (err, data) {
if (err) throw err;
fixtures.assertSimilar(fixtures.expected('linear-16bit.png'), data, done);
});
});
it('applies slope level adjustment w alpha ch', function (done) {
sharp(fixtures.inputPngOverlayLayer1)
.resize(240)