Created
September 22, 2010 14:00
-
-
Save waynegraham/591721 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
image_path = "archive/files" | |
thumbnail_path = "archive/thumbnails" | |
Dir["#{image_path}/*.jpg"].each do |image| | |
fname = File.basename(image) | |
puts "Converting #{fname}..." | |
`convert #{image_path}/#{fname} -thumbnail '300' -gravity Center +repage -strip #{thumbnail_path}/#{fname}` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment