Guest User

Untitled

a guest
May 26th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. Dir.glob("./*") do |file|
  2. next unless file =~ /\.png|\.jpg|\.gif/
  3. basename = File.basename(file, ".*")
  4. basename += '_' if file =~ /\.png$/
  5. run_str = "convert -resize 240x320 -quality 90% #{file} #{basename}.png"
  6. system run_str
  7. end
Add Comment
Please, Sign In to add comment