JPEG EXIF information display - jhead is a great little tool

Paint programs, vector editors, 3d modelers, animation editors, etc.
Message
Author
jeffrey
Posts: 168
Joined: Mon 16 Jan 2006, 04:20
Location: Christchurch, New Zealand

JPEG EXIF information display - jhead is a great little tool

#1 Post by jeffrey »

Is there some way in Puppy to dsplay the EXIF information for a photo?

If not jhead (http://www.sentex.ca/~mwandel/jhead/) is a great tool at only 64kB. It's public domain, fast, comprehensive, etc.
The Ubuntu executable from the above site runs fine on Puppy 2. I added a script to call jhead in an xterm and made that script an option for photos in Rox so that I can see the photo info easily. (Rolling the mouse over the image would be a better way to do this but I can't see a way to get Rox to do that.)

It's a good adjunct to jpegtran and mogrify.
Sample jhead output:

File name : 0805-153933.jpg
File size : 463023 bytes
File date : 2001:08:12 21:02:04
Camera make : Canon
Camera model : Canon PowerShot S100
Date/Time : 2001:08:05 15:39:33
Resolution : 1600 x 1200
Flash used : No
Focal length : 5.4mm (35mm equivalent: 36mm)
CCD Width : 5.23mm
Exposure time: 0.100 s (1/10)
Aperture : f/2.8
Focus Dist. : 1.18m
Metering Mode: center weight
Jpeg process : Baseline

zygo
Posts: 243
Joined: Sat 08 Apr 2006, 20:15
Location: UK

#2 Post by zygo »

Thanks jeffrey

I know how you did the first bit, but, are you saying you can make the context menu different depending on file type in rox?

It seems to work in puppy 3.01 - at least to dump the exif info. Opera displays exif but where it says "Exposure Mode: 5" jhead says "Exposure Mode: Manual"

Where did you get jpegtran and mogrify from?

jeffrey
Posts: 168
Joined: Mon 16 Jan 2006, 04:20
Location: Christchurch, New Zealand

#3 Post by jeffrey »

In rox right click on a photo (eg file ending .jpg) and select Customise Menu. This opens a window on .config/rox.sourceforge.net/OpenWith/.image_jpeg in which you place symbolic links to files that you want to act upon photos. I have several, eg Rotate Right, Rotate Left, Photo Info, etc, each of which is a link to a script in my-applications/bin that, for the Photo Info case, looks like

Code: Select all

#! /bin/sh
#
#  Display EXIF data using jhead in a terminal window.
#

xterm -e jhead $@
I can't recall where I got jpegtran but it's probably part of the image-magick.pup thatI install as standard. Great tool set for everything to do with images.
The guy who wrote jhead put a lot of work into it in my opinion yet regards his effort as too trivial to apply a licence to (other than marking it as public domain).

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#4 Post by disciple »

He forgot to strip it, so anybody who wants it even smaller, download this one to /usr/bin and gunzip it.

Jhead is pretty cool. If there isn't something else in Puppy, shall we suggest Barry put it in?
Attachments
jhead.gz
(25.8 KiB) Downloaded 1474 times

GeoffS
Posts: 427
Joined: Fri 24 Feb 2006, 08:39
Location: Australia

#5 Post by GeoffS »

jhead is very nice, runs perfectly under Puppy 2.12 on this old IBM 600E.
Thanks jeffrey
Geoff

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#6 Post by disciple »

An alternative from http://johnst.org/sw/exiftags/
1. exiftags: spits out Exif tags;
2. exifcom: displays and writes the UserComment tag; and
3. exiftime: displays, adjusts, and writes date/time tags or lists
files in date/time order.
exiftags has more to say than jhead, and exifcom can edit exif UserComment tags as long as they already exist (they don't in photos from either our panasonic or fuji cameras). jhead can't, but can edit the jpeg comments, which are separate from the exif data.
Attachments
exiftime.gz
(18.07 KiB) Downloaded 1107 times
exiftags.gz
(32.09 KiB) Downloaded 1098 times
exifcom.gz
(15.54 KiB) Downloaded 1090 times

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#7 Post by disciple »

I also tried exiv2. It wouldn't compile, so I used a Slackware package. It shows a lot more information, and can edit the exif comment (not the jpeg comment)

zygo
Posts: 243
Joined: Sat 08 Apr 2006, 20:15
Location: UK

#8 Post by zygo »

disciple,

can you upload exiv2 please as well. Which puppy is it compiled for?

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#9 Post by disciple »

It is not compiled for Puppy. I got a compile error, so I installed the Slackware 10.2 package from linuxfiles.net, because I looked on the Slackware distrowatch page for the same kernel version as I have as I thought that would find me a slackware of the same era, so it would likely work for me. I can't post a direct link, but it is eay to find.

It works in Puppy 1, but I think it would most likely work in any newer Puppy as well.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#10 Post by Flash »

Why doesn't mtPaint have an exif reader out of the box? :? How hard would it be to add an exif reader to mtPaint? (Including it in one of the drop-down menus.)

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#11 Post by disciple »

I understood Barry was putting gimageview in Puppy, and I think it reads exif information.

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#12 Post by muggins »

I compiled exiv2-0.15, and uploaded as a .tar.bz2, here:

http://www.murga-linux.com/puppy/viewto ... ch&id=6835

I wonder if probs compiling the latest release are pupversion specific, as I just compiled exif2-0.16 on pup2.16 without problems.

wjaguar
Posts: 359
Joined: Wed 21 Jun 2006, 14:16

#13 Post by wjaguar »

Flash wrote:Why doesn't mtPaint have an exif reader out of the box?
Because it's called mtPaint and not Emacs? ;-)

See, I'm not into reimplementing Unix - I have neither time, nor the inclination. And every action which isn't integral to image editing, and can be safely offloaded to some other program, will be offloaded - an entry in "File->Actions" is the most I'll ever do about any such thing. This is true for printing, and equally true for EXIF.
mtPaint 3.20 has a preconfigured action for EXIF display - it depends on 'exif' tool from here - and 'leafpad' to actually display what 'exif' spits out. To use something else for the purpose, use "File->Actions->Configure" to change the corresponding command line.

-= With best regards, Dmitry Groshev, maintainer of mtPaint =-

zandarian
Posts: 117
Joined: Wed 14 Oct 2009, 21:10

#14 Post by zandarian »

To help newbies like me ...

I've tried these options.

The best of them seems to be exiftags.

With the shell script of jeffrey I couldn't see the info: the console closed very quickly. The script I'm usign, that works, is:

Code: Select all

#! /bin/sh

xterm -hold -e exiftags $@
I've put this code in a new file called exif_show, located in ~/my-applications/bin (~ is like /root). After creating it I've given it the execution permissions (right click -> File .... -> Permissions -> a+x ...... -> Yes).

After downloading exiftags I've moved it to /usr/local/bin . I've had to give it also the execution permissions, the way told above.

I've gone to ~/.config/rox.sourceforge.net/OpenWith (you have to show hidden files to see .config in ~ or /root -you can click the eye of the ROX-Filer for that-) (a quick way to reach this folder is to right click on a file while holding shift -> Customise -> OK). Inside I've created a folder called .image (becomes hidden also). Inside I've created a symbolic link to exif_show, by dragging this file while holding Ctrl and Shift at the same time. This way when I right click on an image -> File ... -> Open With... -> I have exif_show at top -> if I click it I see the EXIF data. A quicker way is to right click on the image while holding shift -> click exif_show.

Comments:

1) In Windows if you right click on an image and then in Properties you have this info. But in Puppy if you right click on the image and then in File .... -> Properties it doesn't appear. That's why I've had to do the stated above.

2) Fotoxx is an useful program to see many images that comes with Puppy (it's in the Graphic menu). It has a EXIF button above, in the toolbar. But this data (I think that it comes from /usr/bin/exiv2) doesn't show the main details.

Though the achieved is quite good there are still 2 problems:

a) The width and the height given by exiftags is not correct. It shows more pixels than the real ones (the ones shown by mtPaint, Fotoxx, ...). Provisional solution: use mtPaint or Fotoxx to see the correct details (shown at the bottom, on the left).

b) It's not possible to get the details of an image with a (white or blank) space in its path (in any directory or in the image name itselft). Provisional solution: copy the file to another directory or folder.

I hope somebody can give solutions to both problems.

Regards

wjaguar
Posts: 359
Joined: Wed 21 Jun 2006, 14:16

#15 Post by wjaguar »

zandarian wrote:a) The width and the height given by exiftags is not correct.
For the couple of images I threw at it, the results were like this: both displayed _two_ width/height pairs, for one both were equal and correct, for the other, one correct and the other wrong.
Maybe the images with the wrong data had been resized by something that preserved EXIF tags, but had not adjusted them? Or, as in the second my testcase, adjusted one pair but not the other?
b) It's not possible to get the details of an image with a (white or blank) space in its path (in any directory or in the image name itselft).
Put the "$@" in quotes. Like this:
xterm -hold -e exiftags "$@"

zandarian
Posts: 117
Joined: Wed 14 Oct 2009, 21:10

#16 Post by zandarian »

Thanks, wjaguar:

I was rechecking my message and was about to edit it, but you were faster ...

Problem a) Sometimes the width and height shown in the EXIF data is OK. 2 examples: in http://www.exif.org/samples/canon-ixus.jpg they are well, but in http://www.exif.org/samples/olympus-c960.jpg they are wrong (double in this case; but other times it's wrong the proportion is different).

Comment 2) In the above examples the EXIF button of Fotoxx works well and shows much EXIF data. The width and height shown are also OK in one case and wrong in the other.

Problem b) I had tried "$@" instead of $@ with no success. I've tried again, also without achieving the objective.

wjaguar
Posts: 359
Joined: Wed 21 Jun 2006, 14:16

#17 Post by wjaguar »

zandarian wrote:Problem b) I had tried "$@" instead of $@ with no success. I've tried again, also without achieving the objective.
That is strange - it works for me, without any problems. On Slackware, that is - but Puppy likewise uses Bash as /bin/sh so it should behave the same.

zandarian
Posts: 117
Joined: Wed 14 Oct 2009, 21:10

#18 Post by zandarian »

Thanks, wjaguar.

Problem b) Tried several times again with the same undesired result. It's strange also because doing something similar with unrar (http://www.murga-linux.com/puppy/viewtopic.php?t=31797) gets success. And it's also strange because exiftags can handle (white or blank) spaces in paths when run in the console (rxvt). What's the problem?

User avatar
ariel
Posts: 140
Joined: Fri 03 Jul 2009, 19:47
Contact:

exif info

#19 Post by ariel »

to add to the exif family I've petted a 31Kb-debian exif. you might like to test it.

tested with puppy 4.2.0.


example of given infos:

--------------------+----------------------------------------------------------
Tag |Value
--------------------+----------------------------------------------------------
Image Description |EXIF_IMG
Manufacturer |PENTACON
Model |luxmedia 12-XS
Orientation |right - top
x-Resolution |300,00
y-Resolution |300,00
Resolution Unit |Inch
Software |PNB340S V1.1700
Date and Time |2009:11:07 16:02:16
YCbCr Positioning |co-sited
Copyright |Copyright 2008 (Photographer) - (Editor)
Compression |JPEG compression
x-Resolution |300,00
y-Resolution |300,00
Resolution Unit |Inch
Exposure Time |1/71 sec.
FNumber |f/2,8
Exposure Program |Portrait
ISO Speed Ratings |50
Exif Version |Exif Version 2.2
Date and Time (origi|2009:11:07 16:02:16
Date and Time (digit|2009:11:07 16:02:16
Components Configura|Y Cb Cr -
Compressed Bits per |1,00
Exposure Bias |0,00 EV
MaxApertureValue |3,00 EV ( f/2,8 )
Metering Mode |Multi Spot
Light Source |0
Flash |Flash did not fire, auto mode.
Focal Length |7,3 mm
Maker Note |36864 bytes undefined data
User Comment |
FlashPixVersion |FlashPix Version 1.0
Color Space |sRGB
PixelXDimension |2320
PixelYDimension |1744
File Source |DSC
Scene Type |1
Custom Rendered |Normal process
Exposure Mode |Auto exposure
White Balance |Auto white balance
Digital Zoom Ratio |0,00
Focal Length In 35mm|35
Scene Capture Type |Portrait
Gain Control |Normal
Contrast |Normal
Saturation |Normal
Sharpness |Normal
Subject Distance Ran|Unknown
InteroperabilityInde|R98
InteroperabilityVers|0100
--------------------+----------------------------------------------------------
EXIF data contains a thumbnail (3710 bytes).
Attachments
exif_0.6.15-5.pet
(13.69 KiB) Downloaded 687 times

southisup
Posts: 6
Joined: Sat 17 Apr 2010, 14:37
Location: Mildura, Victoria, Australia

#20 Post by southisup »

I have tried ariel's PET on Puppy 4.3.1 & it works fine.

To use after installing the PET: with ROX-Filer, browse to where your photo is, right-click in the window, & choose "Window > Terminal Here".

At the terminal command line type, for example:
exif "Image 001.jpg"
or just:
exif
or:
exif --usage
for further instructions.

Thanks ariel!

Post Reply