-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Labels
Description
I want to add sRGB icc profile on my image if interpretation is CMYK. I tried below code but didn't got any solution. I saw icc_transform, icc_import and icc_export method but not exactly get the idea which is for add icc the profile.
$iccProfilePath = 'sRGB2014.icc';
$image = Vips\Image::newFromFile($arg[1], ["access" => "sequential"]);
if ($image->interpretation == "cmyk") {
$image = $image->icc_import(["embedded" => true, "input_profile" => $iccProfilePath]);
}
$image->writeToFile($arg[2]);