mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Add support for profile-less CMYK images #99
This commit is contained in:
BIN
test/fixtures/Channel_digital_image_CMYK_color_no_profile.jpg
vendored
Normal file
BIN
test/fixtures/Channel_digital_image_CMYK_color_no_profile.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 135 KiB |
1
test/fixtures/index.js
vendored
1
test/fixtures/index.js
vendored
@@ -13,6 +13,7 @@ module.exports = {
|
||||
inputJpgWithExifMirroring: getPath('Landscape_5.jpg'), // https://github.com/recurser/exif-orientation-examples/blob/master/Landscape_5.jpg
|
||||
inputJpgWithGammaHoliness: getPath('gamma_dalai_lama_gray.jpg'), // http://www.4p8.com/eric.brasseur/gamma.html
|
||||
inputJpgWithCmykProfile: getPath('Channel_digital_image_CMYK_color.jpg'), // http://en.wikipedia.org/wiki/File:Channel_digital_image_CMYK_color.jpg
|
||||
inputJpgWithCmykNoProfile: getPath('Channel_digital_image_CMYK_color_no_profile.jpg'),
|
||||
|
||||
inputPng: getPath('50020484-00001.png'), // http://c.searspartsdirect.com/lis_png/PLDM/50020484-00001.png
|
||||
inputPngWithTransparency: getPath('blackbug.png'), // public domain
|
||||
|
||||
@@ -66,4 +66,16 @@ describe('Colour space conversion', function() {
|
||||
});
|
||||
});
|
||||
|
||||
it('From profile-less CMYK to sRGB', function(done) {
|
||||
sharp(fixtures.inputJpgWithCmykNoProfile)
|
||||
.resize(320)
|
||||
.toBuffer(function(err, data, info) {
|
||||
if (err) throw err;
|
||||
assert.strictEqual(true, data.length > 0);
|
||||
assert.strictEqual('jpeg', info.format);
|
||||
assert.strictEqual(320, info.width);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user