exif is a command-line utility that allows you to view and modify Exchangeable Image File Format (EXIF) metadata in JPEG files. EXIF metadata is a set of data that is embedded in a JPEG file by the camera or software that was used to create the file. This data can include information such as the camera’s make and model, the date and time the photo was taken, the aperture and shutter speed used, and the GPS coordinates of the location where the photo was taken.
The exif command can be used to display this metadata in a human-readable format. It can also be used to modify the metadata in a JPEG file, such as changing the date and time the photo was taken, or adding or removing tags. It is a powerful tool to manage and understand the metadata of your images, allowing you to organize, sort and analyze your images with more information than just the file name or date.
exif Command Examples
1. Show all recognized EXIF information in an image:
# exif path/to/image.jpg
2. Show a table listing known EXIF tags and whether each one exists in an image:
# exif --list-tags --no-fixup image.jpg
3. Extract the image thumbnail into the file thumbnail.jpg:
# exif --extract-thumbnail --output=thumbnail.jpg image.jpg
4. Show the raw contents of the “Model” tag in the given image:
# exif --ifd=0 --tag=Model --machine-readable image.jpg
5. Change the value of the “Artist” tag to John Smith and save to new.jpg:
# exif --output=new.jpg --ifd=0 --tag="Artist" --set-value="John Smith" --no-fixup image.jpg