Ensure ICC profiles are licenced for distribution #486

This commit is contained in:
Lovell Fuller
2016-07-04 10:11:47 +01:00
parent 85f20c6e1b
commit 91e1ed1314
7 changed files with 11 additions and 5 deletions

View File

@@ -97,8 +97,8 @@ class PipelineWorker : public AsyncWorker {
// Increment processing task counter
g_atomic_int_inc(&counterProcess);
// Latest v2 sRGB ICC profile
std::string srgbProfile = baton->iccProfilePath + "sRGB_IEC61966-2-1_black_scaled.icc";
// Default sRGB ICC profile from https://packages.debian.org/sid/all/icc-profiles-free/filelist
std::string srgbProfile = baton->iccProfilePath + "sRGB.icc";
// Input
ImageType inputImageType = ImageType::UNKNOWN;
@@ -385,8 +385,8 @@ class PipelineWorker : public AsyncWorker {
// Ignore failure of embedded profile
}
} else if (image.interpretation() == VIPS_INTERPRETATION_CMYK) {
// Convert to sRGB using default "USWebCoatedSWOP" CMYK profile
std::string cmykProfile = baton->iccProfilePath + "USWebCoatedSWOP.icc";
// Convert to sRGB using default CMYK profile from http://www.argyllcms.com/cmyk.icm
std::string cmykProfile = baton->iccProfilePath + "cmyk.icm";
image = image.icc_transform(const_cast<char*>(srgbProfile.data()), VImage::option()
->set("input_profile", cmykProfile.data())
->set("intent", VIPS_INTENT_PERCEPTUAL)