mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Ensure withMetadata skips default profile for RGB16 #3773
This commit is contained in:
@@ -794,6 +794,17 @@ describe('Image metadata', function () {
|
||||
assert.strictEqual(intent, 'Perceptual');
|
||||
});
|
||||
|
||||
it('withMetadata does not add default sRGB profile to RGB16', async () => {
|
||||
const data = await sharp(fixtures.inputJpg)
|
||||
.resize(32, 24)
|
||||
.toColorspace('rgb16')
|
||||
.withMetadata()
|
||||
.toBuffer();
|
||||
|
||||
const metadata = await sharp(data).metadata();
|
||||
assert.strictEqual(undefined, metadata.icc);
|
||||
});
|
||||
|
||||
it('File input with corrupt header fails gracefully', function (done) {
|
||||
sharp(fixtures.inputJpgWithCorruptHeader)
|
||||
.metadata(function (err) {
|
||||
|
||||
Reference in New Issue
Block a user