Last active
August 29, 2015 14:05
-
-
Save magnetikonline/0113a2c02c27db4c5a63 to your computer and use it in GitHub Desktop.
Testing jpegtran (libjpeg-turbo) vs. mozjpeg compression abilities on a set of source JPEGs.
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 | |
rm turbo/* | |
rm mozjpeg/* | |
cd orig/ | |
echo libjpeg-turbo | |
find . -name "*.jpg" -exec jpegtran -optimize -copy none -outfile "{}.tmp" "{}" \; -exec mv "{}.tmp" "../turbo/{}" \; | |
echo Done | |
echo libmozjpeg | |
find . -name "*.jpg" -exec /opt/libmozjpeg/bin/jpegtran -optimize -copy none -outfile "{}.tmp" "{}" \; -exec mv "{}.tmp" "../mozjpeg/{}" \; | |
echo Done | |
cd ../ | |
echo | |
du -B1 orig/ | |
du -B1 turbo/ | |
du -B1 mozjpeg/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment