[kwlug-disc] Image Comparison

L.D. Paniak ldpaniak at fourpisolutions.com
Tue Aug 11 22:12:04 EDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Chris Frey wrote:
> On Tue, Aug 11, 2009 at 08:32:52PM -0400, Chris Irwin wrote:
>> The issues are that there ARE duplicated file names in each
>> set("mom.jpg" for example), so I can't do a simple `find | uniq` combo.
>> File sums are also different as tags are stored in EXIF data so
>> something like fslint won't work as it just compares sums based on the
>> whole file.
> 
> Perhaps try the djpeg program from the libjpeg-progs package (debian)
> which decompresses the image to PNM format.  Do this with all your files,
> and then compare the data, or just the checksums:
> 
> 	for f in all/6000/*.jpg ; do
> 		echo "$(sha1sum <(djpeg $f) | sed "s/ .*$//")  $f" >> /tmp/global-list.txt
> 	done
> 
> 	sort global-list.txt
> 
> - Chris
> 

Is the EXIF data compressed with the image or just a header floating on
top? Could one just compare the tails of the files?

for file in *; do echo "$(tail $file |md5sum) $file" >>tmp;  done

sort tmp
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFKgiT08h2PnOHbiQcRAsK2AJ9xLA3uA12qV6ssMSmz2rOUV23UIwCffr/v
CGXHCX5y7cnzk5Hw+CAWbRI=
=7KQz
-----END PGP SIGNATURE-----




More information about the kwlug-disc mailing list