ICC profile (CMYK) gets removed when using profileImage
Posted: 2016-06-09T06:24:53-07:00
On our online server the ICC (CMYK) color profile used for color conversion gets removed. On our local development server it does not get removed. Color conversion takes place on both environments anyhow, so the conversion actually happens.
We've installed identical versions of ImageMagick and Imagick to rule things out, but the issue still occurs. Any ideas as to what could be causing this?
We've installed identical versions of ImageMagick and Imagick to rule things out, but the issue still occurs. Any ideas as to what could be causing this?
Code: Select all
// we're interested if ICC profile(s) exist
$profiles = $img->getImageProfiles('*', false);
$has_icc_profile = (array_search('icc', $profiles) !== false);
// if it doesnt have a RGB ICC profile, we add one
if ($has_icc_profile === false) {
$icc_profile = file_get_contents( './icc/color.org/sRGB_IEC61966-2-1_black_scaled.icc' );
$img->profileImage('icc', $icc_profile); unset($icc_profile);
}
// then we add a CMYK profile for conversion
$icc_profile = file_get_contents( './icc/ISOcoated_v2_300_eci.icc' );
$img->profileImage('icc', $icc_profile); unset($icc_profile);