We have a system where the user uploads an image and it automaticly sets a sRGB color profile to the image. When I try to convert these images with Imagick to AdobeRGB1998, the colors are different. It has the correct colorprofile but the original colors are gone.
I tried repoducing these steps in Photoshop. When I assign the AdobeRGB1998 color profile to the image, the output is the same as the output of my script. When I convert the image to AdobeRGB1998 color profile, the output is the same as the orignal.
In other words I need my Imagick script to convert the color profile, instead of asigne the color profile.
Here is my code:
Code: Select all
$img->setResourceLimit(6, 4);
$img->stripImage();
$img->setImageUnits(imagick::RESOLUTION_PIXELSPERINCH);
$img->setResolution($cDPI,$cDPI);
$img->resampleImage($cDPI,$cDPI, imagick::FILTER_UNDEFINED,1.5);
$img->profileImage('icc', $icc_adobeRGB);
$img->resizeImage($cWidth,$cHeight,imagick::FILTER_LANCZOS,TRUE);
$img->writeImage($input);
$img->destroy();
Orignal image wih sRGB color profile

Image generated with my Imagick script with AdobeRGB1998 color profile

Image generated with photoshop assign AdobeRGB1998 color profile

Image generated with photoshop convert to AdobeRGB1998 color profile
