 |
Forums |
Admin Discussion Forums: help Start New Thread
By: Omer Bar-or
RE: help with cmyk images [ reply ] 2010-07-15 05:35
|
Hi, Joe -
RMagick does its best when there's more than one ImageMagick present, but it often fails and results in weird errors. So, I think your best bet (if you can) is to remove one of the ImageMagicks, then reinstall RMagick.
Good luck!
- Omer.
|
By: Joe Harbinson
help with cmyk images [ reply ] 2010-07-13 19:50
|
I recently attempted to upgrade imageMagick from version 6.5.1-3 to 6.5.1-10 to support reading CMYK jpg files. I also had version 6.2.8 installed on the same server as this was the latest RPM, and the only one my host would install initially. Therefore, both 6.5.1-3 and 6.5.1-10 were compiled from source. I added the 6.5.1-10 to the $PATH variable so I could use convert.
I tried a simple class to test reading the CMYK jpg.
require 'rubygems'
require 'RMagick'
img = Magick::Image.read("coca-cola-logo_cmyk.jpg").first
It would read rgb jpg files, but for cmyk jpg files I would get the following error:
imagemagick.rb:4:in `read': no pixels defined in cache `coca-cola-logo_cmyk.jpg' @ cache.c/OpenPixelCache/3789 (Magick::ImageMagickError)
from imagemagick.rb:4
In trying to trouble shoot, I just tried imagemagick from the command line 'convert' on the cmyk jpg which worked, however, if I used /usr/local/bin/convert it would give a similar error as when I tried running the ruby class. (/usr/local/bin is the location of the 6.5.1-3 version of imageMagick).
I removed imageMagick 6.2.8, uninstalled rmagick (2.12.2) and then re-installed rmagick using gem.
I still got the same error when running the ruby class, however, the straight command line from /usr/local/bin/convert no longer resulted in an error.
So, I still have 6.5.1-3 installed and 6.5.1-10 installed. However, it seems that rmagick is defaulting to 6.5.1-3, even after uninstalling and installing.
Should I uninstall both 6.5.1-3, 6.5.1-10, uninstall the rmagick gem, then reinstall 6.5.1-10 and then re-install the rmagick gem 2.12.2? Is there anywhere else in rmagick where I can configure the imagemagick location to use?
Oh - and convert for 6.5.1-10 is located in
/opt/ImageMagick-6.5.1-10/bin/convert
Sorry for the long post and thank you very much for any help you can provide.
Joe
|
|
 |