Answer the question
In order to leave comments, you need to log in
How to resolve "ColorspaceColorProfileMismatch 'icc'" conflict when generating an image?
Good day, dear $user!
There is a source file in "in.png" PNG format with sRGB scheme.
Must be converted to "TIFF" with CMYK scheme and FOGRA27 profile.
When running the script, an exception arrives " ColorspaceColorProfileMismatch `icc' @ error/profile.c/ProfileImage/866 "
What is my mistake?
$inFile = in.png
$outFile = out.tiff
$base = new Imagick($inFile);
$base->transformImageColorspace(Imagick::COLORSPACE_CMYK);
$base->mergeImageLayers( Imagick::LAYERMETHOD_MERGE);
$base->profileImage('icc', Storage::disk('local')->url('icc_profile/forga27.icc'));
$base->setImageUnits(1);
$base->setImageResolution(127,127);
$base->setCompression(11);
$base->setImageFormat("tiff");
$base->writeImage($outFile);
$base->destroy();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question