Created
January 19, 2014 08:42
-
-
Save aurelienpierre/8502089 to your computer and use it in GitHub Desktop.
A simple script which applies non-destructive optimization algorithms on png and jpg files in order to adjust size vs quality. It proceeds every file in a directory. Linux only. It can easily be added in Nautilus through Nautilus-Actions.
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
#!/bin/bash | |
# Required commands : | |
# - optipng | |
# - jpegoptim | |
# optipng (non destructive) | |
optipng *.png | |
optipng *.PNG | |
# optimize JPG (non-destructive) | |
jpegoptim *.jpg | |
jpegoptim *.JPG | |
jpegoptim *.jpeg | |
jpegoptim *.JPEG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment