Skip to content

Instantly share code, notes, and snippets.

@rlopzc
Created August 21, 2024 14:24
Show Gist options
  • Save rlopzc/095cc7c1fc0a4f46c4af9c7351124483 to your computer and use it in GitHub Desktop.
Save rlopzc/095cc7c1fc0a4f46c4af9c7351124483 to your computer and use it in GitHub Desktop.
# Convert .HEIC to .jpeg (for iphone/mac users)
# TODO: also heic (downcase)
for file in *.HEIC; do
sips -s format jpeg "$file" --out "${file%.HEIC}.jpeg"
mv -v "$file.json" "${file%.HEIC}.jpeg.json"
rm $file
done
exiftool -d "%s" -tagsfromfile %d%f.%e.json "-DateTimeOriginal<PhotoTakenTimeTimestamp" "-FileCreateDate<PhotoTakenTimeTimestamp" "-FileModifyDate<PhotoTakenTimeTimestamp" -overwrite_original -ext jpg -ext jpeg -ext mp4 -ext mov -r .
https://exiftool.org/forum/index.php?topic=12361.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment