Coping with corrupt jpegs in Mac OS X and qucktime player
Certain corrupt JPEG files will explode Quicktime Player if it encounters them in an “Import Image Sequence…” operation. This bug has been present for many years and shows no sign of going away.
If you are archiving images from cheap webcams you will encounter these.
I am not aware of anything included with Mac OS X Leopard that validates a JPEG file, so I built jpeginfo for Leopard.
With that, you can do things like… for v in *.jpg ;do jpeginfo -c \$v || rm \$v ;done … to delete all the corrupted JPEGs.
You can find the sources at http://www.iki.fi/tjko/projects.html You will also need to build libjpeg, from ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
Build libjpeg first (./configure ; make ), then build jpeginfo (./configure –with-libjpeg=THE-RIGHT_DIRECTORY ; make )
But you don’t need to do that… I’ve attached the copy I built.