Skip navigation.

jhead

, ,

…is a small, simple but powerfull command line application, primarily thought as a tool for viewing, extracting, handling or modifying EXIF data in images - and extremely useful for preparing your picture collections.

After downloading the pics from my camera, I first lowercase all files (never really got why digital cameras all save in uppercase) and then run

jhead -autorot *.jpg
to autorotate all images according to their EXIF tag. After this, the orientation tag is set to "1" (which is normal orientation), in order to avoid rotating it once more in case you'd run the command again.

Jpeg images contain, among their EXIF data, also thumbnails, used by digital cameras to preview the image on their LCD display. It is trivial to extract them:

jhead -st "thumbnails/&i" *.jpg
where thumbnails/ is a directory previously created, to contain the thumbnails; and the variable &i tells jhead to use the image's name for the thumbnail.

Et voilà…

jhead has a plethora of options for more advanced usage, and your needs might be different than mine - so I'll leave them to you to discover…

Incidentally, the author of jhead is the very same guy who built his own home pipe organ. :smile:

apache configure problemunleash the powers

Comments

dantesoft 14. January 2007, 01:02

Are you sure all digital cameras generate thumbnails in the (Exif flavour of) Jpeg files ?

Ramunas 14. January 2007, 08:18

You're my hero, just yesterday I got a camera with position sensor, and I was thinking about writing an app which would rotate the images for me myself. Thanks :smile:

csant 14. January 2007, 08:54

dantesoft, thumbnails are part of the EXIF spec (which, admittedly, is a mess), and AFAIK all modern cameras do add the thumbnail. They are small and take about 10K. Of course jhead can also remove them from the image. Some cameras add also a second, larger, thumbnail to the image itself (and not the metadata)! This is due to size restrtictions of the metadata in an image.

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.

December 2009
S M T W T F S
November 2009January 2010
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31