Skip to content

Instantly share code, notes, and snippets.

@Sixeight
Created October 8, 2008 07:27
Show Gist options
  • Save Sixeight/15461 to your computer and use it in GitHub Desktop.
Save Sixeight/15461 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'RMagick'
1.upto 50 do |idx|
file = Dir["#{idx}/*.*"].first
p file
if file
img = Magick::ImageList.new(file).first
img.change_geometry('600x600') do |c, l, i|
i.resize! c, l
i.write File.join("#{idx}", 'display', File.basename(file))
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment