创建图片时出现“ColorspaceColorProfileMismatch 'icc'”冲突如何解决?

How to resolve the “ColorspaceColorProfileMismatch 'icc'” conflict when creating an image?

美好的一天,亲爱的 $user!

有一个 "in.png" PNG 格式的源文件,采用 sRGB 方案。 必须使用 CMYK 方案和 FOGRA27 配置文件转换为 "TIFF"。

脚本为运行时,异常“ColorspaceColorProfileMismatch`icc'@error/profile.c/ProfileImage/866 "

我的错误是什么?

$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();

而不是 Storage::disk ('local')->get('icc_profile/fogra27.icc') 我通过了 url (Storage::disk('local')- >url('icc_profile/forga27.icc'))

谢谢。