On Mon, 31 Jul 2006, jdow wrote:
Break the image into pieces. If too many pieces match on MD5 sum then you score it higher than if lots of the image is different. But that can get tedious to say the least.
And there's also an easy way around it. Simply add noise to the image. There are a number of techniques, but an obvious one to use with GIF is to assign two palette entries to two nearly (but not quite) identical colors. For example, put 0xffffff and 0xfffeff in your palette. Then, for every white pixel in the original image, choose at random whether it gets represented by a 0xffffff or 0xfffeff pixel. There will be virtually no discernable difference to the eye, but the files will completely different, especially since GIF uses LZW compression on the pixel data. There are similar methods for other formats: with JPEG, you can just change the quality settings, causing the JPEG decoder itself to add noise to your image. (And perfectly legit noise, too, since the quality parameters vary on legit images.) And of course you can just add noise to the least significant bit in any generic format as well. - Logan