From: Michelle Pace Date: 2011-08-23T20:37:21+09:00 Subject: Re: Converting .tiff -to-> .png? Thanks Jon, I followed the instructions on phosphor-escence. Unfortunately I couldn't get the rmagick gem to install(see attachment). If anyone has any ideas I'd be real interested to hear them. But I did get ImageMagick to install and instead (of using rmagick) I just issue ImageMagick commands directly from my ruby code. Not as nice but it works. For completeness of this post here are my exact steps: [0] I installed ruby192 as well as the DevKit using http://rubyinstaller.org/ on windows 7. [1] Installed ImageMagick-6.7.1-10-Q16-windows-dll.exe * downloaded from http://www.imagemagick.org/script/binary-releases.php#windows * I installed to "C:\ImageMagick-6.7.1-Q16" (no spaces!!) * ticked "Add application directory to your system path" * ticked "Install development headers & libraries for C and C++" [2] I confirmed ImageMagick works via command prompt with: * % C:\ImageMagick-6.7.1-Q16\convert.exe convert.tif -resize 10% new.png [?] I attempted to instal the 'rmagick' gem with the below command. I got an error. (see attachment) and gave up. * % gem install rmagick --platform=ruby -- --with-opt-lib=C:/ImageMagick-6.7.1-Q16/lib --with-opt-include=C:/ImageMagick-6.7.1-Q16/include [4] Instead of using RMagick, I just call the ImageMagick CMD command directly from my ruby script:- if (system('C:\ImageMagick-6.7.1-Q16\convert.exe convert.tif new.png')) puts "yahoo! converting tif to png worked" else puts "oof it failed" end [lastly] If I could have gotten the rmagick gem to install, this is how I would do the same command in [4] but in nicer ruby code: require 'RMagick' jpg = Magick::ImageList.new("doc.jpg") thumb = jpg.scale(300, 300) thumb.write "doc.png" Cheers Michelle Attachments: http://www.ruby-forum.com/attachment/6540/gem_make.out -- Posted via http://www.ruby-forum.com/.