2005-07-10 Web

I’m saving about one third on JPEG image file size by stripping them of the thumbnail as I said on 2005-07-06 Software. This is my *cleanse* script:

2005-07-06 Software

#! /bin/sh
if [ -z $1 ]; then
    echo No images to cleanse.
    exit 1;
fi

for f in $*; do
    echo cleanse $f
    n=/tmp/`basename $f`
    jpegtran -optimize -trim -copy none -outfile $n $f && mv $n $f
done

​#Web