Converted colors CMYK to SRGB too bright
Posted: 2017-01-30T02:03:38-07:00
Hi,
I am having some troubles with color conversions. My website receives several images with different color profiles, so during the upload I need to convert them all to SRGB; my (former) web agency implemented "setImageColorSpace" but the colors of some images come out really too bright.
Here is our code:
$icc_rgb = file_get_contents(HOME_DIRECTORY . '/Software/htdocs/sRGB_v4_ICC_preference.icc');
$image = new Imagick($tmpPath);
$image->profileImage('icc', $icc_rgb);
$image->setImageColorSpace(Imagick::COLORSPACE_SRGB);
$image->writeImage($tmpPath);
I am not too familiar with PHP and cannot go back to my agency to ask them to fix this issue. Is there something wrong in the code or are the problems in the specific images that are uploaded?
Thank you for any help!
I am having some troubles with color conversions. My website receives several images with different color profiles, so during the upload I need to convert them all to SRGB; my (former) web agency implemented "setImageColorSpace" but the colors of some images come out really too bright.
Here is our code:
$icc_rgb = file_get_contents(HOME_DIRECTORY . '/Software/htdocs/sRGB_v4_ICC_preference.icc');
$image = new Imagick($tmpPath);
$image->profileImage('icc', $icc_rgb);
$image->setImageColorSpace(Imagick::COLORSPACE_SRGB);
$image->writeImage($tmpPath);
I am not too familiar with PHP and cannot go back to my agency to ask them to fix this issue. Is there something wrong in the code or are the problems in the specific images that are uploaded?
Thank you for any help!