29 lines
870 B
Markdown
29 lines
870 B
Markdown
## 📷📆 - 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:
|
||
# Don’t process makernote tags, don’t 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
|
||
``` |