Created
May 23, 2010 06:58
-
-
Save igaiga/410710 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
Dir.glob("./*") do |file| | |
next unless file =~ /\.png|\.jpg|\.gif/ | |
basename = File.basename(file, ".*") | |
basename += '_' if file =~ /\.png$/ | |
run_str = "convert -resize 240x320 -quality 90% #{file} #{basename}.png" | |
system run_str | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment