画像ファイルのタイムスタンプをexifの時間に合わせる

画像ファイルをSNSなどにアップロードするときに回線が細かったりデータ転送料金が従量制だったりするときにリサイズしてアップロードしたりするのですが,サービスによってはファイルのタイムスタンプを参照して悲しいことになることも.
オリジナルのexifが残っている場合はそれを参照してファイルのタイムスタンプを修正することが可能です.
というメモ.

$ exiftool "-FileModifyDate<DateTimeOriginal" DP1M0???.resized.JPG
   10 image files updated

環境

$ dpkg-query -W libimage-exiftool-perl
libimage-exiftool-perl  10.96-1
$ lsb_release -d
Description:    Debian GNU/Linux unstable (sid)
$ uname -m
x86_64

関連

One thought to “画像ファイルのタイムスタンプをexifの時間に合わせる”

コメントを残す

メールアドレスが公開されることはありません。 ※ が付いている欄は必須項目です

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.