The following Linux shell script will identify all progressive JPEGs, in the directory tree under the directory it resides in, and batch convert them to baseline.
It requires ImageMagick to be installed (on Fedora install it like this: yum install ImageMagick)
for img in `find . -name "*" | egrep *\.jpe?g$`
idout=`identify -verbose $img | grep -i interlace | grep -i none$`
if [[ -z $idout ]]
echo "$img is progressive"
echo "....making copy of original with .prog extension"
/bin/cp -f $img $img.prog
echo "....converting to baseline"
convert $img -interlace none $img
#echo "$img is non-progressive"
This article was originally posted at http://fotios.org/node/2668
I have a keen interest in IT Security, Internet applications, and systems/embedded development. My recent research interests have included secure networks, models of trust, trusted agents, information exchange, and software development methodologies.