jhead is a very nice and very powerful command line utility to mess with JPEG headers (esp. EXIF fields).
$ apt-get install jhead
It can display/extract a great amount of metadata fields from JPEG files and also extract the thumbnails stored in JPEG files (if any). The following will list all known metadata fields from a sample photo:
$ wget http://farm4.static.flickr.com/3173/3061542361_60acb0904b_o.jpg $ jhead *.jpg File name : 3061542361_60acb0904b_o.jpg File size : 1074172 bytes File date : 2008:11:26 23:38:04 Camera make : Panasonic Camera model : DMC-FZ18 Date/Time : 2008:03:05 15:45:52 Resolution : 3264 x 2448 Flash used : No Focal length : 4.6mm (35mm equivalent: 28mm) Exposure time: 0.0100 s (1/100) Aperture : f/3.6 ISO equiv. : 100 Whitebalance : Auto Metering Mode: matrix Exposure : program (auto) GPS Latitude : N %:.7fd %;.8fm %;.8fs GPS Longitude: E %;.8fd %:.7fm %;.8fs GPS Altitude : 174.00m Comment : Aufgenommen auf dem <a href="http://www.froutes.de/TT00000014_Ars_Natura">Kunstweg Ars Natura</a>. ======= IPTC data: ======= Record vers. : 4 Headline : Felsburg auf dem Felsberg (C)Notice : www.froutes.de Caption : Aufgenommen auf dem <a href="http://www.froutes.de/TT00000014_Ars_Natura">Kunstweg Ars Natura</a>.
As you can see there's a huge amount of potentially privacy-sensitive metadata in your typical JPEG as generated by your camera (including camera type, settings, date/time, maybe even GPS coordinates of your location, etc).
You can extract the thumbnail stored in all JPEGs in the current directory with:
$ jhead -st "&i_t.jpg" *.jpg Created: '3061542361_60acb0904b_o.jpg_t.jpg'
Note that the JPEG thumbnail does not necessarily show the same picture as the JPEG itself. Depending on the image manipulation software that was used to create the edited/fixed/cropped JPEG, the thumbnail may still reflect the original JPEG contents (see sample image on the right-hand side). This is a huge potential privacy issue. There have been a number of articles about this some years ago, in case you missed them:
Thus, an important jhead command line to know is the following, which removes all metadata (including any thumbnails) from all JPEG images in the current directory:
$ jhead -purejpg *.jpg Modified: 3061542361_60acb0904b_o.jpg
As you can see the result is that only very basic information can be gathered from the file afterwards:
$ jhead *.jpg File name : 3061542361_60acb0904b_o.jpg File size : 1052506 bytes File date : 2008:11:26 23:38:04 Resolution : 3264 x 2448 $ jhead -st "&i_t.jpg" *.jpg Image contains no thumbnail
I recommend doing this for most photos you make publically available on sites like flickr etc. (unless you have a good reason not to). Finally, see the jhead(1) manpage for lots more options that the tool supports.
Recent comments
25 weeks 1 day ago
51 weeks 3 days ago
1 year 6 weeks ago
1 year 7 weeks ago
1 year 7 weeks ago