Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread
Message: 94198
BY: Joe Harbinson (joe_harbinson)
DATE: 2010-07-13 19:50
SUBJECT: help with cmyk images

 

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


Thread View

Thread Author Date
help with cmyk imagesJoe Harbinson2010-07-13 19:50
      RE: help with cmyk imagesOmer Bar-or2010-07-15 05:35
            RE: help with cmyk imagesJoe Harbinson2010-07-15 18:09

Post a followup to this message