Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Add Comment
Please, Sign In to add comment