mirror of
https://github.com/lovell/sharp.git
synced 2025-07-12 20:10:13 +02:00
Ensure ICC profiles are licenced for distribution #486
This commit is contained in:
parent
85f20c6e1b
commit
91e1ed1314
@ -30,6 +30,10 @@ Requires libvips v8.3.1
|
|||||||
[#456](https://github.com/lovell/sharp/pull/456)
|
[#456](https://github.com/lovell/sharp/pull/456)
|
||||||
[@kapouer](https://github.com/kapouer)
|
[@kapouer](https://github.com/kapouer)
|
||||||
|
|
||||||
|
* Ensure ICC profiles are licenced for distribution.
|
||||||
|
[#486](https://github.com/lovell/sharp/issues/486)
|
||||||
|
[@kapouer](https://github.com/kapouer)
|
||||||
|
|
||||||
#### v0.15.0 - 21<sup>st</sup> May 2016
|
#### v0.15.0 - 21<sup>st</sup> May 2016
|
||||||
|
|
||||||
* Use libvips' new Lanczos 3 kernel as default for image reduction.
|
* Use libvips' new Lanczos 3 kernel as default for image reduction.
|
||||||
|
Binary file not shown.
BIN
icc/cmyk.icm
Normal file
BIN
icc/cmyk.icm
Normal file
Binary file not shown.
BIN
icc/sRGB.icc
Normal file
BIN
icc/sRGB.icc
Normal file
Binary file not shown.
Binary file not shown.
@ -97,8 +97,8 @@ class PipelineWorker : public AsyncWorker {
|
|||||||
// Increment processing task counter
|
// Increment processing task counter
|
||||||
g_atomic_int_inc(&counterProcess);
|
g_atomic_int_inc(&counterProcess);
|
||||||
|
|
||||||
// Latest v2 sRGB ICC profile
|
// Default sRGB ICC profile from https://packages.debian.org/sid/all/icc-profiles-free/filelist
|
||||||
std::string srgbProfile = baton->iccProfilePath + "sRGB_IEC61966-2-1_black_scaled.icc";
|
std::string srgbProfile = baton->iccProfilePath + "sRGB.icc";
|
||||||
|
|
||||||
// Input
|
// Input
|
||||||
ImageType inputImageType = ImageType::UNKNOWN;
|
ImageType inputImageType = ImageType::UNKNOWN;
|
||||||
@ -385,8 +385,8 @@ class PipelineWorker : public AsyncWorker {
|
|||||||
// Ignore failure of embedded profile
|
// Ignore failure of embedded profile
|
||||||
}
|
}
|
||||||
} else if (image.interpretation() == VIPS_INTERPRETATION_CMYK) {
|
} else if (image.interpretation() == VIPS_INTERPRETATION_CMYK) {
|
||||||
// Convert to sRGB using default "USWebCoatedSWOP" CMYK profile
|
// Convert to sRGB using default CMYK profile from http://www.argyllcms.com/cmyk.icm
|
||||||
std::string cmykProfile = baton->iccProfilePath + "USWebCoatedSWOP.icc";
|
std::string cmykProfile = baton->iccProfilePath + "cmyk.icm";
|
||||||
image = image.icc_transform(const_cast<char*>(srgbProfile.data()), VImage::option()
|
image = image.icc_transform(const_cast<char*>(srgbProfile.data()), VImage::option()
|
||||||
->set("input_profile", cmykProfile.data())
|
->set("input_profile", cmykProfile.data())
|
||||||
->set("intent", VIPS_INTENT_PERCEPTUAL)
|
->set("intent", VIPS_INTENT_PERCEPTUAL)
|
||||||
|
@ -303,7 +303,9 @@ describe('Image metadata', function() {
|
|||||||
assert.strictEqual(true, metadata.icc instanceof Buffer);
|
assert.strictEqual(true, metadata.icc instanceof Buffer);
|
||||||
var profile = icc.parse(metadata.icc);
|
var profile = icc.parse(metadata.icc);
|
||||||
assert.strictEqual('object', typeof profile);
|
assert.strictEqual('object', typeof profile);
|
||||||
assert.strictEqual('sRGB IEC61966-2-1 black scaled', profile.description);
|
assert.strictEqual('RGB', profile.colorSpace);
|
||||||
|
assert.strictEqual('Perceptual', profile.intent);
|
||||||
|
assert.strictEqual('Monitor', profile.deviceClass);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user