Writing an add-in to detect duplicates



I have a problem where I accidentally import photos more than once. I'd like to compare photos based on some hash (SHA1 perhaps) of the decoded image data inside the file. (Hashing the raw file is problematic because metadata may have changed, and I figure I should hash the decoded data baecause in the case of a lossless format it's still the same image when recompressed.)

It would be great to memoize this in a metadata tag in the image so that way every program could just calculate this for the file it's trying to import, see if this value exists already, and ask me what I wanted it to do.

I'm happy to write such a plugin/add-in/extension, but I don't know where to find out more about the interface for doing so. Anyone have any thoughts on this plan (maybe there are better ways to detect duplicates?) or how to code such a thing (is there plugin writing documentation?)?

Thanks!

-- Asheesh.

--
In the stairway of life, you'd best take the elevator.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]