-
-
Notifications
You must be signed in to change notification settings - Fork 5
Exif
icloudpd-rs reads and optionally writes EXIF date metadata in downloaded photos.
After downloading a JPEG file, the DateTimeOriginal EXIF tag is read. If present, it is used to set the file's modification time so that file managers sort photos by capture date rather than download date.
When --set-exif-datetime is enabled, icloudpd-rs checks each downloaded JPEG for the DateTimeOriginal tag (EXIF tag 36867). If the tag is missing, the asset's iCloud creation date is written into all three standard EXIF date tags:
-
DateTime(tag 306) - file modification date -
DateTimeOriginal(tag 36867) - original capture date -
DateTimeDigitized(tag 36868) - digitization date
This is useful for:
- Screenshots that lack EXIF data
- Images downloaded from the web and saved to iCloud
- Edited photos where the original EXIF was stripped
EXIF writing currently applies to JPEG files only. HEIC files are not modified.
When --set-exif-datetime writes EXIF tags, the resulting file may differ by 29-58 bytes compared to the same file processed by Python icloudpd (which uses piexif). icloudpd-rs uses little_exif, which produces slightly different but equally valid EXIF metadata. The photos are visually identical and the metadata is correct - only the binary encoding differs slightly.
EXIF failures (read errors, write errors) are logged per-file as warnings and counted across the sync session. The download summary includes the count when any EXIF operations failed - for example: 10 downloaded (2 EXIF failures), 0 failed. The download itself is still considered successful; only the EXIF metadata was not applied.
Regardless of the --set-exif-datetime flag, the file modification time is always synced to the asset's creation date from iCloud. This ensures correct chronological ordering in file managers.