Skip to content

Instantly share code, notes, and snippets.

@l4u
Created March 31, 2012 11:14
Show Gist options
  • Save l4u/2262281 to your computer and use it in GitHub Desktop.
Save l4u/2262281 to your computer and use it in GitHub Desktop.
Optimizing PNGs
Dir.glob("**/*.png").each do |file|
['pngnq -e .png -f', 'pngquant -f -speed 1 -ext .png', 'pngcrush'].each do |command|
puts "#{command} #{file}"
`#{command} #{file}`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment