Ok, I have some solution, but I donβt know how it works, if someone can try it, I will be very pleased :)
$img->setImageColorspace(13); $icc_rgb = file_get_contents('AdobeRGB1998.icc'); $img->profileImage('icc', $icc_rgb); unset($icc_rgb); $icc_cmyk = file_get_contents('USWebUncoated.icc'); $img->profileImage('icc', $icc_cmyk); $img->setImageColorspace(12); unset($icc_cmyk); $img->setimagecolorspace(Imagick::COLORSPACE_CMYK); $img->stripImage(); $img->writeImage('cmyk.png');
source share