This repository has been archived on 2025-05-28. You can view files and clone it, but cannot push or open issues or pull requests.
photo-datestamper/README.md

27 lines
824 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 📷📆 - photo-datestamper
Little script to add date caption to photos from their EXIF data.
## Notes on Exif data
There is [ExifRead](https://github.com/ianare/exif-py) or [Exif](https://exif.readthedocs.io/en/latest/index.html) which can also modify exif data (and is tested and documented).
Both seem to be alive but `ExifRead` should suffice.
```python
with open(file, 'rb') as f:
# Dont process makernote tags, dont extract the thumbnail image (if any)
tags = exif.process_file(f, details=False)
for tag in tags.keys():
if tag not in ('JPEGThumbnail', 'TIFFThumbnail', 'Filename', 'EXIF MakerNote'):
```
Interesting keys (to be completed by further observations):
```
Image Orientation
Image DateTime
EXIF DateTimeOriginal
EXIF DateTimeDigitized
EXIF ExifImageWidth
EXIF ExifImageLength
```