mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Ensure keepIccProfile avoids ICC transform #4186
This commit is contained in:
@@ -601,6 +601,17 @@ describe('Image metadata', function () {
|
||||
assert.strictEqual(description, 'Generic RGB Profile');
|
||||
});
|
||||
|
||||
it('keep existing ICC profile, avoid colour transform', async () => {
|
||||
const [r, g, b] = await sharp(fixtures.inputPngWithProPhotoProfile)
|
||||
.keepIccProfile()
|
||||
.raw()
|
||||
.toBuffer();
|
||||
|
||||
assert.strictEqual(r, 131);
|
||||
assert.strictEqual(g, 141);
|
||||
assert.strictEqual(b, 192);
|
||||
});
|
||||
|
||||
it('keep existing CMYK ICC profile', async () => {
|
||||
const data = await sharp(fixtures.inputJpgWithCmykProfile)
|
||||
.pipelineColourspace('cmyk')
|
||||
|
||||
Reference in New Issue
Block a user