Exiftool
From Segfault
exiftool
Show a summary of meta data information, with
$ exiftool -s image.jpg ExifToolVersion : 12.50 FileName : image.jpg FileSize : 796 kB FileModifyDate : 2008:09:09 14:19:08+02:00 FileAccessDate : 2023:05:06 11:25:11+02:00 FileInodeChangeDate : 2023:05:06 11:25:11+02:00 [...]
Show all meta data information:
TBD
Remove just the geo location from the picture:
$ exiftool -GPSPosition image.jpg GPS Position : 23.0" N, 42.00" W $ exiftool -gps:all= -xmp:geotag= image.jpg
exiv2
Show a summary of meta data information:
$ exiv2 image.jpg File name : image.jpg File size : 795691 Bytes MIME type : image/jpeg Image size : 1200 x 1600 Thumbnail : image/jpeg, 6288 Bytes [...]
Show all meta data information, with their exact tag names:
$ exiv2 -p a image.jpg Exif.Image.Make Ascii 6 Canon Exif.Image.Model Ascii 25 Canon DIGITAL IXUS 80 IS Exif.Image.Orientation Short 1 top, left Exif.Image.Software Ascii 16 QuickTime 7.6.3 [...]
Show Exif, IPTC and Xmp information separately:
$ exiv2 -p e image.jpg Exif.Image.ImageDescription Ascii 16 foobar Exif.Image.Make Ascii 6 Canon Exif.Image.Model Ascii 25 Canon DIGITAL IXUS 80 IS [...] $ exiv2 -p i image.jpg Iptc.Application2.Caption String 15 foobar $ exiv2 -p x image.jpg Xmp.xmp.Label XmpText 15 foobar
Add description to Exif, Xmp and IPTC data:
exiv2 -k -M "add Exif.Image.ImageDescription foo" -M "add Xmp.xmp.Label foo" -M "add Iptc.Application2.Caption foo" image.jpg
Remove all metadata, but preserve the file timestamp:
$ exiv2 --keep delete image.jpg
Remove only Exif data:
$ exiv2 -d e rm image.jpg $ exiv2 pr image.jpg File name : image.jpg File size : 59360 Bytes MIME type : image/jpeg Image size : 576 x 768 image.jpg: No Exif data found in the file
Remove a single tag:
$ exiv2 -p x image.jpg Xmp.xmp.Label XmpText 15 foobar $ exiv2 --keep --Modify "del Xmp.xmp.Label" image.jpg $ exiv2 -p x image.jpg [empty]
Repair
Fix corrupted metadata:
$ exiv2 image.jpg Error: Directory Canon with 6656 entries considered invalid; not read. Warning: Directory Pentax, entry 0x0004: Data area exceeds data buffer, ignoring it. $ exiftool -preserve -exif:all= -tagsfromfile @ -exif:all -unsafe -thumbnailimage image.jpg
Check with exiftool -G0 image.jpg
and remove image.jpg_original
if all is well.