All Colors Revert To Black When Composite Onto CMYK MIFF
Posted: 2011-10-24T00:04:25-07:00
I'm quite familiar with ImageMagick and have been using it for a while. I use it to create book covers, they are CMYK 300dpi.
I used to use a combination of ImageMagick and the PHP IMagick functions, but then I decided to rewrite the script in only ImageMagick commands (called by PHP using exec) as I expect this will be more efficient.
The problem is that the colors disappear from the text when it is composited onto the canvas and they end up black!
See here:
The resulting text is not "rgb(213,193,130)" as it should be, but black. It is the correct color in the working.png file where the text is created, but loses its color when composited onto the canvas (miff file, CMYK, 300dpi).
The same happens whether or not I set "-colorspace CMYK" for the text.
Please help!
I used to use a combination of ImageMagick and the PHP IMagick functions, but then I decided to rewrite the script in only ImageMagick commands (called by PHP using exec) as I expect this will be more efficient.
The problem is that the colors disappear from the text when it is composited onto the canvas and they end up black!
See here:
Code: Select all
exec('convert -trim -background transparent -colorspace CMYK -font '.$spinetitlefont.' -size 930x'.ceil($spinewidth*0.75).' -fill "rgb(213,193,130)" caption:"'.$c_title.'" -rotate 90 output/'.$i9.'-working.png');
list($width, $height, $type, $attr)=getimagesize('output/'.$i9.'-working.png'); $w=2700-($width/2);
exec('composite -compose Over -geometry +'.$w.'+994 output/'.$i9.'-working.png output/'.$i9.'-cover.miff output/'.$i9.'-cover.miff');
The same happens whether or not I set "-colorspace CMYK" for the text.
Please help!