Hi, > On 23. May 2018, at 07:22, Berthold Stoeger <[email protected]> > wrote: > > 1) They have the same filename (modulo path and case) > 2) They have the same length > 3) They have the same meta-data in the case of JPEG > Finding two different pictures fulfilling 1-3 must be very bad luck. We > currently don't store file-length, but that can be trivially rectified when > opening an old log.
we originally introduced the hashing to make the „find images“ thing possible so you don’t have to preserve paths (and filename conventions) between different computers. On the other hand, we want to notice when the user changed the image (for example by photoshopping, so I guess we have to take the content into account). So my choice would be: Completely ignore filename and path, but maybe take into account length and creation date. I don’t have a lot of experience but why not hash 1MB of data after seeking to 30% of file size? I would guess that is a pretty good test. Or maybe there is an easy way to take internal meta date into account as well? Best Robert
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
