From: Timothy Hunter Date: 2007-03-04T00:39:50+09:00 Subject: Re: How to download file from web site ara.t.howard@noaa.gov wrote: > On Sun, 4 Mar 2007, Timothy Hunter wrote: > >>> >>> -a >> Thanks again, Ara! >> > > no way - thank you! i'm preparing a class right now, here's one of many > examples i've got put together: > > > # > # gem install RMagick @ http://rmagick.rubyforge.org/ > # > require "rubygems" > require "RMagick" > # > # converts all images named on the command-line into thumbnails > # > ARGV.each do |path| > path = File.expand_path path > dirname, basename = File.split path > base, ext = basename.split %r/[.]/, 2 > > img = Magick::ImageList.new path > > thumb = img.thumbnail 96, 96 > thumb_path = File.join dirname, "#{ base }.thumb.#{ ext }" > thumb.write thumb_path > > puts thumb_path > end > > > > thanks for rmagick. > > -a You're welcome! The reason I'm asking these questions is because I'm working on a Ruby program to download and install ImageMagick, all its delegate libraries, and RMagick, on OS X, starting from scratch and not using MacPorts. BTW, I saw your comment about the rmagick gem. You're right, it's screwy. I'm hoping to mothball it in RMagick 2.0.0, if I can figure out a way to replace my autoconf-generated configure script with pure Ruby.