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

29 lines
870 B
Markdown
Raw Normal View History

2020-11-15 01:34:44 +01:00
## 📷📆 - photo-datestamper
2020-11-14 22:10:47 +01:00
2020-11-15 01:34:44 +01:00
Little script to add date caption to photos from their EXIF data.
2020-11-15 01:49:29 +01:00
![Sample result](sample.png "Sample result")
2020-11-15 01:34:44 +01:00
## 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
```