<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Jhead</id>
	<title>Jhead - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Jhead"/>
	<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Jhead&amp;action=history"/>
	<updated>2026-05-09T16:53:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://aznot.com/index.php?title=Jhead&amp;diff=333&amp;oldid=prev</id>
		<title>Kenneth: /* Install jhead */</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Jhead&amp;diff=333&amp;oldid=prev"/>
		<updated>2014-07-07T00:55:36Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Install jhead&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== jhead ==&lt;br /&gt;
&lt;br /&gt;
jhead - [[Exif]] Jpeg header manipulation tool - http://www.sentex.net/~mwandel/jhead&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;quot;Jhead is a program for manipulating settings and thumbnails in Exif jpeg headers&lt;br /&gt;
used by most Digital Cameras.  v2.97 Matthias Wandel, Jan 30 2013.&lt;br /&gt;
http://www.sentex.net/~mwandel/jhead&amp;quot;&amp;#039;&amp;#039; (jhead help page)&lt;br /&gt;
&lt;br /&gt;
=== Install jhead ===&lt;br /&gt;
&lt;br /&gt;
Build:&lt;br /&gt;
 #JVER=2.96&lt;br /&gt;
 JVER=2.97&lt;br /&gt;
 mkdir -p ~/.src ; cd ~/.src&lt;br /&gt;
 wget http://www.sentex.net/~mwandel/jhead/jhead-${JVER}.tar.gz&lt;br /&gt;
 tar -zvxf jhead-${JVER}.tar.gz&lt;br /&gt;
 cd jhead-${JVER}&lt;br /&gt;
 make &amp;amp;&amp;amp; make install&lt;br /&gt;
&lt;br /&gt;
 #installs &amp;#039;jhead&amp;#039; to /usr/local/bin/&lt;br /&gt;
&lt;br /&gt;
 # sudo mkdir -p /opt/jhead/usr/local/bin&lt;br /&gt;
 # make clean &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo DESTDIR=/opt/jhead make install&lt;br /&gt;
&lt;br /&gt;
=== Auto Rotate Image ===&lt;br /&gt;
&lt;br /&gt;
Lossless auto rotation: (uses jpegtran)&lt;br /&gt;
 jhead -autorot *JPG&lt;br /&gt;
&lt;br /&gt;
=== Adjust date and time ===&lt;br /&gt;
&lt;br /&gt;
Set file modification time to Exif time:&lt;br /&gt;
 jhead -v -ft *jpg&lt;br /&gt;
&lt;br /&gt;
Set Exif time to file modification time&lt;br /&gt;
 jhead -v -dsft *jpg&lt;br /&gt;
&lt;br /&gt;
Adjust time by h:mm backwards or forwards:&lt;br /&gt;
 # -ta&amp;lt;+|-&amp;gt;h[:mm[:ss]]&lt;br /&gt;
 # adjust 8 hours forward&lt;br /&gt;
 jhead -v -ta+8 -ft *jpg&lt;br /&gt;
&lt;br /&gt;
Adjust date by large amounts:&lt;br /&gt;
 # -da&amp;lt;date&amp;gt;-&amp;lt;date&amp;gt;&lt;br /&gt;
 jhead -v -da2011:04:02/14:21:00-2011:01:01/00:00:00 -ft pic/*JPG&lt;br /&gt;
&lt;br /&gt;
=== help ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ jhead -h&lt;br /&gt;
Jhead is a program for manipulating settings and thumbnails in Exif jpeg headers&lt;br /&gt;
used by most Digital Cameras.  v2.97 Matthias Wandel, Jan 30 2013.&lt;br /&gt;
http://www.sentex.net/~mwandel/jhead&lt;br /&gt;
&lt;br /&gt;
Usage: jhead [options] files&lt;br /&gt;
Where:&lt;br /&gt;
 files       path/filenames with or without wildcards&lt;br /&gt;
[options] are:&lt;br /&gt;
&lt;br /&gt;
GENERAL METADATA:&lt;br /&gt;
  -te &amp;lt;name&amp;gt; Transfer exif header from another image file &amp;lt;name&amp;gt;&lt;br /&gt;
             Uses same name mangling as &amp;#039;-st&amp;#039; option&lt;br /&gt;
  -dc        Delete comment field (as left by progs like Photoshop &amp;amp; Compupic)&lt;br /&gt;
  -de        Strip Exif section (smaller JPEG file, but lose digicam info)&lt;br /&gt;
  -di        Delete IPTC section (from Photoshop, or Picasa)&lt;br /&gt;
  -dx        Deletex XMP section&lt;br /&gt;
  -du        Delete non image sections except for Exif and comment sections&lt;br /&gt;
  -purejpg   Strip all unnecessary data from jpeg (combines -dc -de and -du)&lt;br /&gt;
  -mkexif    Create new minimal exif section (overwrites pre-existing exif)&lt;br /&gt;
  -ce        Edit comment field.  Uses environment variable &amp;#039;editor&amp;#039; to&lt;br /&gt;
             determine which editor to use.  If editor not set, uses VI&lt;br /&gt;
             under Unix and notepad with windows&lt;br /&gt;
  -cs &amp;lt;name&amp;gt; Save comment section to a file&lt;br /&gt;
  -ci &amp;lt;name&amp;gt; Insert comment section from a file.  -cs and -ci use same naming&lt;br /&gt;
             scheme as used by the -st option&lt;br /&gt;
  -cl string Insert literal comment string&lt;br /&gt;
&lt;br /&gt;
DATE / TIME MANIPULATION:&lt;br /&gt;
  -ft        Set file modification time to Exif time&lt;br /&gt;
  -dsft      Set Exif time to file modification time&lt;br /&gt;
  -n[format-string]&lt;br /&gt;
             Rename files according to date.  Uses exif date if present, file&lt;br /&gt;
             date otherwise.  If the optional format-string is not supplied,&lt;br /&gt;
             the format is mmdd-hhmmss.  If a format-string is given, it is&lt;br /&gt;
             is passed to the &amp;#039;strftime&amp;#039; function for formatting&lt;br /&gt;
             %d Day of month    %H Hour (24-hour)&lt;br /&gt;
             %m Month number    %M Minute    %S Second&lt;br /&gt;
             %y Year (2 digit 00 - 99)        %Y Year (4 digit 1980-2036)&lt;br /&gt;
             For more arguments, look up the &amp;#039;strftime&amp;#039; function.&lt;br /&gt;
             In addition to strftime format codes:&lt;br /&gt;
             &amp;#039;%f&amp;#039; as part of the string will include the original file name&lt;br /&gt;
             &amp;#039;%i&amp;#039; will include a sequence number, starting from 1. You can&lt;br /&gt;
             You can specify &amp;#039;%03i&amp;#039; for example to get leading zeros.&lt;br /&gt;
             This feature is useful for ordering files from multiple digicams to&lt;br /&gt;
             sequence of taking.  Only renames files whose names are mostly&lt;br /&gt;
             numerical (as assigned by digicam)&lt;br /&gt;
             The &amp;#039;.jpg&amp;#039; is automatically added to the end of the name.  If the&lt;br /&gt;
             destination name already exists, a letter or digit is added to&lt;br /&gt;
             the end of the name to make it unique.&lt;br /&gt;
             The new name may include a path as part of the name.  If this path&lt;br /&gt;
             does not exist, it will be created&lt;br /&gt;
  -a         (Windows only) Rename files with same name but different extension&lt;br /&gt;
             Use together with -n to rename .AVI files from exif in .THM files&lt;br /&gt;
             for example&lt;br /&gt;
  -ta&amp;lt;+|-&amp;gt;h[:mm[:ss]]&lt;br /&gt;
             Adjust time by h:mm forwards or backwards.  Useful when having&lt;br /&gt;
             taken pictures with the wrong time set on the camera, such as when&lt;br /&gt;
             traveling across time zones or DST changes. Dates can be adjusted&lt;br /&gt;
             by offsetting by 24 hours or more.  For large date adjustments,&lt;br /&gt;
             use the -da option&lt;br /&gt;
  -da&amp;lt;date&amp;gt;-&amp;lt;date&amp;gt;&lt;br /&gt;
             Adjust date by large amounts.  This is used to fix photos from&lt;br /&gt;
             cameras where the date got set back to the default camera date&lt;br /&gt;
             by accident or battery removal.&lt;br /&gt;
             To deal with different months and years having different numbers of&lt;br /&gt;
             days, a simple date-month-year offset would result in unexpected&lt;br /&gt;
             results.  Instead, the difference is specified as desired date&lt;br /&gt;
             minus original date.  Date is specified as yyyy:mm:dd or as date&lt;br /&gt;
             and time in the format yyyy:mm:dd/hh:mm:ss&lt;br /&gt;
  -ts&amp;lt;time&amp;gt;  Set the Exif internal time to &amp;lt;time&amp;gt;.  &amp;lt;time&amp;gt; is in the format&lt;br /&gt;
             yyyy:mm:dd-hh:mm:ss&lt;br /&gt;
  -ds&amp;lt;date&amp;gt;  Set the Exif internal date.  &amp;lt;date&amp;gt; is in the format YYYY:MM:DD&lt;br /&gt;
             or YYYY:MM or YYYY&lt;br /&gt;
&lt;br /&gt;
THUMBNAIL MANIPULATION:&lt;br /&gt;
  -dt        Remove exif integral thumbnails.   Typically trims 10k&lt;br /&gt;
  -st &amp;lt;name&amp;gt; Save Exif thumbnail, if there is one, in file &amp;lt;name&amp;gt;&lt;br /&gt;
             If output file name contains the substring &amp;quot;&amp;amp;i&amp;quot; then the&lt;br /&gt;
             image file name is substitute for the &amp;amp;i.  Note that quotes around&lt;br /&gt;
             the argument are required for the &amp;#039;&amp;amp;&amp;#039; to be passed to the program.&lt;br /&gt;
             An output name of &amp;#039;-&amp;#039; causes thumbnail to be written to stdout&lt;br /&gt;
  -rt &amp;lt;name&amp;gt; Replace Exif thumbnail.  Can only be done with headers that&lt;br /&gt;
             already contain a thumbnail.&lt;br /&gt;
  -rgt[size] Regnerate exif thumbnail.  Only works if image already&lt;br /&gt;
             contains a thumbail.  size specifies maximum height or width of&lt;br /&gt;
             thumbnail.  Relies on &amp;#039;mogrify&amp;#039; programs to be on path&lt;br /&gt;
&lt;br /&gt;
ROTATION TAG MANIPULATION:&lt;br /&gt;
  -autorot   Invoke jpegtran to rotate images according to Exif orientation tag&lt;br /&gt;
             Note: Windows users must get jpegtran for this to work&lt;br /&gt;
  -norot     Zero out the rotation tag.  This to avoid some browsers from&lt;br /&gt;
             rotating the image again after you rotated it but neglected to&lt;br /&gt;
             clear the rotation tag&lt;br /&gt;
&lt;br /&gt;
OUTPUT VERBOSITY CONTROL:&lt;br /&gt;
  -h         help (this text)&lt;br /&gt;
  -v         even more verbose output&lt;br /&gt;
  -q         Quiet (no messages on success, like Unix)&lt;br /&gt;
  -V         Show jhead version&lt;br /&gt;
  -exifmap   Dump header bytes, annotate.  Pipe thru sort for better viewing&lt;br /&gt;
  -se        Supress error messages relating to corrupt exif header structure&lt;br /&gt;
  -c         concise output&lt;br /&gt;
  -nofinfo   Don&amp;#039;t show file info (name/size/date)&lt;br /&gt;
&lt;br /&gt;
FILE MATCHING AND SELECTION:&lt;br /&gt;
  -model model&lt;br /&gt;
             Only process files from digicam containing model substring in&lt;br /&gt;
             camera model description&lt;br /&gt;
  -exonly    Skip all files that don&amp;#039;t have an exif header (skip all jpegs that&lt;br /&gt;
             were not created by digicam)&lt;br /&gt;
  -cmd command&lt;br /&gt;
             Apply &amp;#039;command&amp;#039; to every file, then re-insert exif and command&lt;br /&gt;
             sections into the image. &amp;amp;i will be substituted for the input file&lt;br /&gt;
             name, and &amp;amp;o (if &amp;amp;o is used). Use quotes around the command string&lt;br /&gt;
             This is most useful in conjunction with the free ImageMagick tool.&lt;br /&gt;
             For example, with my Canon S100, which suboptimally compresses&lt;br /&gt;
             jpegs I can specify&lt;br /&gt;
                jhead -cmd &amp;quot;mogrify -quality 80 &amp;amp;i&amp;quot; *.jpg&lt;br /&gt;
             to re-compress a lot of images using ImageMagick to half the size,&lt;br /&gt;
             and no visible loss of quality while keeping the exif header&lt;br /&gt;
             Another invocation I like to use is jpegtran (hard to find for&lt;br /&gt;
             windows).  I type:&lt;br /&gt;
                jhead -cmd &amp;quot;jpegtran -progressive &amp;amp;i &amp;amp;o&amp;quot; *.jpg&lt;br /&gt;
             to convert jpegs to progressive jpegs (Unix jpegtran syntax&lt;br /&gt;
             differs slightly)&lt;br /&gt;
  -orp       Only operate on &amp;#039;portrait&amp;#039; aspect ratio images&lt;br /&gt;
  -orl       Only operate on &amp;#039;landscape&amp;#039; aspect ratio images&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
</feed>