0
我使用PHP的Imagick擴展來處理圖像。以下是我的代碼Imagick在使用imagick時出現負像的結果:: profileImage
try{
$sourceimg=dirname(__FILE__)."\\source.jpg";
$destinationimg=dirname(__FILE__)."\\source_cmyk.tiff";
$im=new Imagick();
$im->setResolution(300,300);
$im->readImage($sourceimg);
$im->setImageColorSpace(imagick::COLORSPACE_CMYK);
$im->stripImage();
[email protected]_get_contents("C:\\USWebUncoated.icc");
$im->profileImage("icm",$cmykprofile);
$im->setImageDepth(8);
$im->setImageUnits(1); //0=undefined, 1=pixelsperInch, 2=PixelsPerCentimeter
$im->setResolution(300,300); //set output resolution to 300 dpi
$im->setImageCompressionQuality(100);
$im->writeImage($destinationimg);
}catch(ImagickException $e){
echo $e->getMessage();
}
我遇到的問題是代碼否定原始圖像。只有當我使用$im->profileImage
時,纔會出現此問題。這將是什麼原因?以及如何解決這個問題?我使用的配置文件是我從http://www.adobe.com/support/downloads/detail.jsp?ftpID=3680
下載的cmyk顏色配置文件任何幫助將不勝感激。
感謝