Issue
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 the script is run, the exception "ColorspaceColorProfileMismatch` icc '@error/profile.c/ProfileImage/866 "
What's 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();
Solution
Instead of Storage::disk ('local')->get('icc_profile/fogra27.icc') I passed url (Storage::disk('local')->url('icc_profile/forga27.icc'))
Thank.
Answered By - devAston Answer Checked By - Katrina (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.