HomeMathComputingArtsWordsLiteratureMusictwitter facebook webfeed

How to View Comments in JPEG, PNG, MP3 files? (ExifTool Tutorial)

Advertise Here For Profit

Xah Lee, 2010-07-02

This page shows you how to get the textual comments embedded in jpeg, png, gif, files.

What's JPEG JFIF EXIF?

The JPEG is actually just standard compression scheme. It does not actually define a file format. The file formats we usually associate with the name “jpeg” is actually the JFIF and Exif.

JFIF is the file format for images compressed using jpeg. Vast majority of jpeg images are stored in the jfif file format, except those from digital cameras.

Exif is used by basically all digital cameras. The file contains info such as date time, camera settings, and thumbnail.

Metadata is also stored is various different formats, for files other than image files. For example, video files, and even text files. Two popular general-purpose metadata formats are: IPTC, XMP. There's also the ID3 format for MP3 audio files. There's also Mac OS X Extended Attributes.

What Info Are Embedded?

Metadata can be arbitrary, especially when using IPTC and XMP formats. There may be a lot info embedded in a image files, some can be a privacy issue. For examples:

Camera model, camera serial number, camera settings (exposure, shutter, etc.), earth location coordinates (GPS), copyright info, description, summery, character encoding used, keywords (tags), ...

For audio files, it can be song name, composer, artist, album name, rating, sample rate, bps, encoding used, ...

How to View and Change Metadata?

Most good image editors or photo software should be able to show the metadata. On Windows, usually pressing 【Alt+Enter】 shows the metadata. Here's some example of software that will show metadata:

Note: if you are not using a dedicated software, the info displayed by the above may not be ALL there is.

ExifTool

The ExifTool, by Phil Harvey, is a widely used popular tool for dealing with metadata in image files. It's available as a command line tool for Windows and unix, but also as a Perl module.

Download at: ExifTool home page.

On Windows, to display metadat, just drag and drop the file onto the icon. Though, it's best used as a command line tool. Just double click to read the doc on how.

To show metadata of a image file on command line, do for example:

exiftool myPhoto.jpg

To show metedata for all images in a dir, you can do for example:

exiftool *jpg
exiftool *png
exiftool */*jpg
exiftool */*/*jpg

For all subdirs, do:

find . -name "*jpg" | xargs -l -i exiftool "{}"

Full documentation at: exiftool man page. Plain text version at: exiftool_man_page.txt

Sample Outputs

blog comments powered by Disqus