$file = 'orignal.png'; $file_cmyk = str_replace('.png', '_cmyk.jpg', $file); $icc1 = \Yii::getAlias('@vendor/imagine/imagine/lib/Imagine/resources/color.org/sRGB_IEC61966-2-1_black_scaled.icc'); $icc2 = \Yii::getAlias('@vendor/imagine/imagine/lib/Imagine/resources/Adobe/CMYK/USWebUncoated.icc'); $cmd = "convert $file -intent relative -black-point-compensation -profile $icc1 -profile $icc2 -quality 100 $file_cmyk"; system($cmd);