Alex Rivera | Logout

Is it possible to detect duplicate image files?

Asked 2010-08-01T21:54:11.290
14

I have over 10K files for products, the problem is is that many of the images are duplicates.

If there is no image, there is a standard image that says 'no image'.

How can I detect if the image is this standard 'no image' image file?

Update The image is a different name, but it is exactly the same image otherwise.

People are saying Hash, so would I do this?

im = cStringIO.StringIO(file.read())
img = im.open(im)
md5.md5(img)
Edit
Report

1 Answer

0

Hash them. Collisions are duplicates (at least, it's a mathematical impossibility that they aren't the same file).

answered 2010-08-01T22:08:31.590

Your Answer