ICC profile (CMYK) gets removed when using profileImage

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
taa_user
Posts: 2
Joined: 2016-06-09T05:58:48-07:00
Authentication code: 1151

ICC profile (CMYK) gets removed when using profileImage

Post by taa_user »

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?

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); 
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: ICC profile (CMYK) gets removed when using profileImage

Post by snibgo »

I know nothing about Imagick but for those who do, what are the version numbers of ImageMagick and Imagick?

It might help if you upload the input the two outputs (the one that worked, and the one that didn't).
snibgo's IM pages: im.snibgo.com
taa_user
Posts: 2
Joined: 2016-06-09T05:58:48-07:00
Authentication code: 1151

Re: ICC profile (CMYK) gets removed when using profileImage

Post by taa_user »

Both environments use ImageMagick v6.9.3-0 and Imagick v3.3.0.
Post Reply