quote:
Originally posted by mynetx
@SpunkyLoveMuff:
The file names are the originals from Messenger. Even if the picture is updated by the user (or by another script), the file name won't change, whereas if you compare the bytes, it is very unlikely that two different images have the same size.
Dunno if I understood you correctly, but the chance that two different DPs have the same filesize IS likely. So, this is not a good way to see if there is another DP.
The only foolproof method you have and need to implement is comparing the file hash with the hash of the previous DP (of that _same_ user; important!). In essence, comparing the file byte per byte...
A faster method would be to check the filechange date and time. Though this isn't as accurate as comparing byte per byte by the use of a hash (the datetime can be changed by the user using 3rd party software and other Windows APIs), it is maybe accurate enough in most cases.