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);