3

I want to import pictures from the photo library on iOS but I want to check that I haven't already done so in the past.

What can I use as a unique identifier to check for?

What I thought so far are these:

  1. Created Date ( This might have a low probability of conflict, might have pictures taken at the same time or saved at the same time by iphoto)
  2. Pictures filesize (Depending on how accurate I can get this number)
  3. A combination of the two?
  4. Exif Data? (Works well for pictures taken but what if you have images with no Exif?)

What are you using?

Thanks

Leonardo Amigoni
  • 1,807
  • 3
  • 21
  • 33

1 Answers1

2

Something I used when I had a problem like this was the MD5-Hash of the combination of date (in this case unix timestamp) and filename. I think this should be unique.

chritaso
  • 593
  • 5
  • 23
  • Depends on your scale. If you are doing this across a lot of users & devices, you should consider that 1) file timestamps will sometimes be reset (1 January 1970!), harmonized, set to hour or day boundaries, etc. 2) filename sequences will be identical for many cameras. – Clay Bridges Jan 18 '13 at 20:28