Last active
May 23, 2022 20:24
-
-
Save arvi1000/dcc09d39a237d20f283f5ba8cdd11aa5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Process all JPEG files in the current dir and apply timestamp, using imagemagick | |
import glob | |
import re | |
import os | |
jpgs = glob.glob('*.jpeg') | |
for j in jpgs: | |
newfile = re.sub('\\.jpeg$', '_stamp.jpeg', j) | |
im_command = f'convert {j} -undercolor Black -fill white -pointsize 100 -auto-orient -gravity NorthWest -annotate 0 "%[EXIF:DateTimeOriginal]" {newfile}' | |
print(f'Processing {j}') | |
os.system(im_command) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment