<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.hermann-uwe.de" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Uwe Hermann - jhead - List and modify EXIF fields in JPEG photos - Comments</title>
 <link>http://www.hermann-uwe.de/blog/jhead--list-and-modify-exif-fields-in-jpeg-photos</link>
 <description>Comments for &quot;jhead - List and modify EXIF fields in JPEG photos&quot;</description>
 <language>en</language>
<item>
 <title>jpegoptim</title>
 <link>http://www.hermann-uwe.de/blog/jhead--list-and-modify-exif-fields-in-jpeg-photos#comment-61372</link>
 <description>&lt;p&gt;Yeah, jpegoptim is also working fine with &quot;--strip-all&quot;, it seems to remove all EXIF fields and also the thumbnail. The difference is that jhead probably has more EXIF related options and does not optimize JPGs (as jpegoptim does).&lt;/p&gt;
&lt;p&gt;Uwe.&lt;/p&gt;
</description>
 <pubDate>Fri, 28 Nov 2008 18:27:20 +0100</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">comment 61372 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>jpegoptim</title>
 <link>http://www.hermann-uwe.de/blog/jhead--list-and-modify-exif-fields-in-jpeg-photos#comment-61369</link>
 <description>&lt;p&gt;How does that compare to using the jpegoptim package in this way?&lt;/p&gt;
&lt;pre&gt;
  jpegoptim --strip-all  image.jpg
&lt;/pre&gt;&lt;p&gt;
Francois&lt;/p&gt;
</description>
 <pubDate>Thu, 27 Nov 2008 23:44:00 +0100</pubDate>
 <dc:creator>Francois</dc:creator>
 <guid isPermaLink="false">comment 61369 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>jhead - List and modify EXIF fields in JPEG photos</title>
 <link>http://www.hermann-uwe.de/blog/jhead--list-and-modify-exif-fields-in-jpeg-photos</link>
 <description>&lt;p&gt;&lt;a href=&quot;http://www.sentex.net/~mwandel/jhead/&quot;&gt;jhead&lt;/a&gt; is a very nice and very powerful command line utility to mess with &lt;a href=&quot;http://en.wikipedia.org/wiki/Exif&quot;&gt;JPEG headers (esp. EXIF fields)&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;
  $ &lt;strong&gt;apt-get install jhead&lt;/strong&gt;
&lt;/pre&gt;&lt;p&gt;
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:&lt;/p&gt;
&lt;p&gt;&lt;small&gt;&lt;/p&gt;
&lt;pre&gt;
  $ &lt;strong&gt;wget http://farm4.static.flickr.com/3173/3061542361_60acb0904b_o.jpg&lt;/strong&gt;
  $ &lt;strong&gt;jhead *.jpg&lt;/strong&gt;
  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 &amp;lt;a href=&quot;http://www.froutes.de/TT00000014_Ars_Natura&quot;&amp;gt;Kunstweg Ars Natura&amp;lt;/a&amp;gt;.
  ======= IPTC data: =======
  Record vers.  : 4
  Headline      : Felsburg auf dem Felsberg
  (C)Notice     : www.froutes.de
  Caption       : Aufgenommen auf dem &amp;lt;a href=&quot;http://www.froutes.de/TT00000014_Ars_Natura&quot;&amp;gt;Kunstweg Ars Natura&amp;lt;/a&amp;gt;.
&lt;/pre&gt;&lt;p&gt;&lt;/small&gt;&lt;/p&gt;
&lt;p&gt;As you can see there&#039;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).&lt;/p&gt;
&lt;p&gt;You can extract the thumbnail stored in all  JPEGs in the current directory with:&lt;/p&gt;
&lt;pre&gt;
  $ &lt;strong&gt;jhead -st &quot;&amp;i_t.jpg&quot; *.jpg&lt;/strong&gt;
  Created: &#039;3061542361_60acb0904b_o.jpg_t.jpg&#039;
&lt;/pre&gt;&lt;p&gt;
&lt;a href=&quot;http://www.hermann-uwe.de/node/1408&quot;&gt;&lt;img src=&quot;http://www.hermann-uwe.de/files/images/jpeg_exif_sample.preview.jpg&quot; width=&quot;320&quot; height=&quot;161&quot; align=&quot;right&quot; hspace=&quot;5&quot; alt=&quot;Random flickr image and its differing thumbnail&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note that the JPEG thumbnail does &lt;strong&gt;not&lt;/strong&gt; 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 &lt;em&gt;huge&lt;/em&gt; potential privacy issue. There have been a number of articles about this some years ago, in case you missed them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://blogs.23.nu/disLEXia/2005/05/antville-7817/&quot;&gt;disLEXia: Hidden data in Document Formats&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blogs.23.nu/disLEXia/2004/12/antville-5751/&quot;&gt;disLEXia: EXIF Thumbnail in JPEG images&lt;/a&gt; (many sample JPEGs and their differing thumbnails)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.ssddfj.org/papers/SSDDFJ_V1_1_Cohen.pdf&quot;&gt;Kevin Cohen: Digital Still Camera Forensics&lt;/a&gt; (PDF)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;pre&gt;
  $ &lt;strong&gt;jhead -purejpg *.jpg&lt;/strong&gt;
  Modified: 3061542361_60acb0904b_o.jpg
&lt;/pre&gt;&lt;p&gt;
As you can see the result is that only very basic information can be gathered from the file afterwards:&lt;/p&gt;
&lt;pre&gt;
  $ &lt;strong&gt;jhead *.jpg&lt;/strong&gt;
  File name    : 3061542361_60acb0904b_o.jpg
  File size    : 1052506 bytes
  File date    : 2008:11:26 23:38:04
  Resolution   : 3264 x 2448
  $ &lt;strong&gt;jhead -st &quot;&amp;i_t.jpg&quot; *.jpg&lt;/strong&gt;
  Image contains no thumbnail
&lt;/pre&gt;&lt;p&gt;
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 &lt;a href=&quot;http://linux.die.net/man/1/jhead&quot;&gt;jhead(1)&lt;/a&gt; manpage for lots more options that the tool supports.&lt;/p&gt;
</description>
 <comments>http://www.hermann-uwe.de/blog/jhead--list-and-modify-exif-fields-in-jpeg-photos#comments</comments>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/217">command line</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/2043">exif</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/2044">jhead</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/2042">jpeg</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/2041">jpg</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/60">linux</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/124">perl</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/254">privacy</category>
 <pubDate>Thu, 27 Nov 2008 01:07:11 +0100</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">1409 at http://www.hermann-uwe.de</guid>
</item>
</channel>
</rss>
