-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Milestone
Description
After updating to 0.29.1 from 0.29.0 my tests start failing when parsing buffers after resize
What are the steps to reproduce?
I have a resize function that uses sharp and where the data is sent over a buffer where sharp fails to reconstruct the 16-bit data
To reproduce using sharps own unit tests:
it("16-bit PNG after resize should retain 16-bit space", async function () {
const img = sharp(fixtures.inputPngWithTransparency16bit);
const orgSpace = (await img.metadata()).space;
const space = await new Promise((resolve, reject) => {
img
.resize(32, 16, { fit: "contain" })
.toBuffer(async function (err, data, info) {
if (err) throw err;
resolve((await sharp(data).metadata()).space);
});
});
assert.equal(space, orgSpace);
});
Reactions are currently unavailable