Posted: Sun Apr 03, 2005 9:55 pm Post subject: Image manipulation snippet
We were discussing resizing images (for the Ruby IDE discussion) and I took a look at RMagick. So, a quick look at the code to write an application which resizes a number of images to 400x300 pixels.
code:
#!/usr/bin/ruby
require 'RMagick'
include Magick
ARGV.each do |file_name|
ImageList.new(file_name).resize(400, 300).write("tn-#{file_name}")
end