Created
May 1, 2011 19:45
-
-
Save munen/950801 to your computer and use it in GitHub Desktop.
Script for compressing images. Saves me about 25-30% of space with no visible difference. Measured on pictures from my 10MP camera.
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 | |
# Script for compressing images. Saves me about 17% of space with no visible | |
# difference. Measured on > 250 pictures from my 10MP camera. | |
for image in "$@" | |
do | |
# Make exif tag in jpg - set's the file's creation date. | |
jhead -mkexif $image | |
convert -resize 80% -quality 85 $image $image | |
# Convert touched the file, tainting the creation date. Set it from the exif | |
# tag. | |
jhead -ft $image | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment