コマンドラインで画像のExif修正

デジカメの日付の設定を間違えたので、Exifの日付をコマンドラインで一括修正する方法を見つけました。

By Toshiyuki Yoshida

デジカメの日付の設定を間違え Exif の日付を修正したかったが、 AppStore から余計なアプリをインストールしたくなかったので、Homebrew で exiftool をインストールして修正。

# Install exiftool using Homebrew
brew install exiftool

# Confirm dates of exif
exiftool R0000001.jpg
    ExifTool Version Number         : 12.76
    File Name                       : R0000001.JPG
    Directory                       : .
    File Size                       : 12 MB
    File Modification Date/Time     : 2024:08:26 12:42:29+09:00
    File Access Date/Time           : 2024:08:26 12:43:26+09:00
    File Inode Change Date/Time     : 2024:08:26 12:43:24+09:00
    File Permissions                : -rwx------
    File Type                       : JPEG
    File Type Extension             : jpg
    MIME Type                       : image/jpeg
    Exif Byte Order                 : Little-endian (Intel, II)
    (Output truncated for brevity)

# Modify dates of exif
exiftool -Alldates='2024:08:23 12:11:00' -overwrite_original ./*