Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I download archives, they often contain images I already have in another folder, but mostly with another name or file-format.

My question: What script / software 1 do you know, that can recognize 2 duplicate images?

It should let you decide if they are really the same (and possibly remove the images with inferior quality).

1 at best cross-platform, but Linux would be sufficient

2 e.g. by their color-difference or something

share|improve this question
You might want to look here:… – gentlesea Jun 26 '12 at 12:36
up vote 4 down vote accepted

for windows their is a small freeware "visipic". it can search for similar pictures and give you the option to delete or move the files according to their quality.

download visipic

share|improve this answer
I love VisiPics, also it does state the developer has tested it under Wine. – Christopher Galpin Apr 2 '11 at 19:09
Thank you, this worked very well under Wine. Awesome! – Joschua Apr 18 '11 at 20:52

A bit of python magic can help you here. Making sure that PIL is installed:

import os, sys, glob
import ImageChops, Image

def equal(im1, im2):
    return ImageChops.difference(im1, im2).getbbox() is None

dir1 = sys.argv[1]
dir2 = sys.argv[2]

for im1 in glob.glob(os.path.join(dir1, "*.jpg")):
    for im2 in glob.glob(os.path.join(dir2, "*.jpg")):
        if im1!=im2 and equal(,
            print im1, "==", im2

Assuming the script is saved as

$python dir1 dir2

It will look for all JPG images in dir1 and dir2, and compare them. It works in O(N^2) excluding the time ImageChops.difference takes, so may be not suitable for large set of image archives. But gives you the idea. Modify and hack as you please.

share|improve this answer

For byte by byte copies of images, you can use the diff command in a terminal (man diff) For images that probably aren't identical logically, there's a program named fdupes that I used to use in ubuntu.

share|improve this answer

You must log in to answer this question.

protected by Community Feb 11 '13 at 10:40

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .