[Digikam-users] Images.uniquehash calculation
Marcel Wiesweg
marcel.wiesweg at gmx.de
Mon Jun 17 18:24:45 BST 2013
> Disclaimer: probably this is not the right list to ask this. if so,
> just let me know. also, I'm not subscribed, so please CC me in the
> answers.
>
> I'm trying to write a script that is able to take an image already
> in digikam's database and resize it, apply the same tags as the
> original, and possibly remove the original. so far the idea is that this
> script will be independent of digikam, touching it's database when
> needed. so I checked the database structure and it looks ok, except for
> the md5sum. I tried to reimplement DImgLoader::uniqueHashV2() in
> libs/dimg/loaders/dimgloader.cpp:329, and even reimplementing it in
> python with the same libraries (qt4's md5) and copying the algo line by
> line, I get different values in the database and with the script. am I
> missing something? for omparisson, I attach the script I did.
That's the fun of a hash...Well, I dont know.
For debugging, I would record the binary data you feed into the hash in Python
and C++ to a file, compare that one. If it differs, you'll be able to locate
the problem. If not, there's a difference in the hash implementation, but I
doubt that.
Marcel
More information about the Digikam-users
mailing list