方法1:exiftool
exiftool -all:all= -r /path/to/file [/path/to/file...]
方法2:mogrify
mogrify -strip /path/to/file
結果
サイズが変わってる。mogrify は画質いじってるのでは・・・
$exiftool -all:all= -r sample1.heic $mogrify -strip sample2.heic $exiftool -all sample1.heic > a $ exiftool -all sample2.heic > b $ ls -l sample*.heic -rwxrwxrwx 1 takuya takuya 3751758 Aug 25 17:46 sample1.heic -rwxrwxrwx 1 takuya takuya 2327024 Aug 25 17:46 sample2.heic
exiftool と mogrigfy の差分をみると
きれいに消えてるのがmogrify 、一部残ってるのがexiftool 。
vimdiff a b
どっちを使うのか迷うところであるが、画像をアップロードしたり公開するならmogrify ですかね。