Hi,
I’m trying to use the routines on this page:
http://addictedtonew.com/archives/127/rotating-images-with-rmagick-and-ruby-on-rails/
to try and rotate some images.
I tried using the script/console to do some testing, - I know
ImageMagick is working, as I’m using the filecolumn plugin to resize
images as they are loaded. When I try, using the console, to rotate an
image, I get an error on this line:
image = Magick::ImageList.new(photo.file)
(substituting the correct field of my database, of course)
The error is:
Magick::ImageMagickError: NoDecodeDelegateForThisImageFormat
`/Users/john/Desktop/TeamTracker/public/team/image/3/DSC_2806.jpg’:
I did see some info about setting the MAGICK_HOME environment
variable, and I tried setting it to what I thought would be right, but
I still get the error.
Anyone have any hints? Any settings I need to make?
Thanks!
jt
On 3/23/06, John T. [email protected] wrote:
Hi,
I’m trying to use the routines on this page:
http://addictedtonew.com/archives/127/rotating-images-with-rmagick-and-ruby-on-rails/
to try and rotate some images.
Just for completeness, and to add to the list archives for future
questions:
Add these lines to your environment.rb file:
ENV[“MAGICK_CODER_MODULE_PATH”]=
/Applications/Locomotive/Bundles/
rails-0.14.3-max.bundle/Contents/Resources/ports/lib/
ImageMagick-6.2.4/modules-Q16/coders"
ENV[“MAGICK_CONFIGURE_PATH”]= “/Applications/Locomotive/Bundles/
rails-0.14.3-max.bundle/Contents/Resources/ports/lib/
ImageMagick-6.2.4/config:/Applications/Locomotive/Bundles/
rails-0.14.3-max.bundle/Contents/Resources/ports/share/
ImageMagick-6.2.4/config”
ENV[“GS_FONTPATH”] = “/usr/lib/X11/fonts/Type1:/usr/lib/X11/fonts/TTF”
ENV[“GS_LIB”] = “/Applications/Locomotive/Bundles/rails-0.14.3-
max.bundle/Contents/Resources/ports/share/ghostscript/8.51/lib:/
Applications/Locomotive/Bundles/rails-0.14.3-max.bundle/Contents/
Resources/ports/share/ghostscript/fonts”
obviously, replacing the paths as appropriate.
Hope this helps someone.