Ensure profile-less CMYK roundtrip skips space conv #3620

This commit is contained in:
Lovell Fuller
2023-04-11 20:31:57 +01:00
parent 2e0f789c9b
commit b763801d68
3 changed files with 20 additions and 1 deletions

View File

@@ -93,6 +93,19 @@ describe('Colour space conversion', function () {
});
});
it('Profile-less CMYK roundtrip', async () => {
const [c, m, y, k] = await sharp(fixtures.inputJpgWithCmykNoProfile)
.pipelineColourspace('cmyk')
.toColourspace('cmyk')
.raw()
.toBuffer();
assert.deepStrictEqual(
{ c, m, y, k },
{ c: 55, m: 27, y: 0, k: 0 }
);
});
it('From sRGB with RGB16 pipeline, resize with gamma, to sRGB', function (done) {
sharp(fixtures.inputPngGradients)
.pipelineColourspace('rgb16')