[TAG] JPEG de-duplication
ben at linuxgazette.net
Mon Jul 26 01:10:12 MSD 2010
On Sun, Jul 25, 2010 at 09:23:52PM +0100, Thomas Adam wrote:
> On Sun, Jul 25, 2010 at 09:19:34PM +0100, Neil Youngman wrote:
> > Are there any graphics experts in the gang who can confirm this? Alternatively
> > suggestions of existing tools that will do the job, or better approaches,
> > would be most welcome.
> Imagemagick has the "compare" command to do this.
Y'know, I recall hearing about it, but had never tried it out. I just
did, and - it doesn't seem to work.
I grabbed a random JPG and copied it, then ran 'compare' against the
original and the copy (as expected, any ImageMagic util has a weird
ben at Jotunheim:/tmp$ compare 1.jpg 2.jpg out.jpg
OK, so it produced a "comparison map" - out.jpg - that was just a very
low-contrast version of the original. Presumably, though, the '@ 0,0'
means that the two are the same. OK - so then, I edited one of the
two files in Gimp and changed the lower right corner pixel to white (it
had been quite dark, possibly black), and ran the comparison again.
Still got the same '@ 0,0' - even though the two images were now
different, including their filesizes - although the map was now some
weird-looking thing with red streaks running riot through it (but
nothing notable in the lower right corner.)
Perhaps the usual confusing-as-hell IM man page contains the secret, but
I haven't been able to find it.
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
More information about the TAG