Page 1 of 2

JPEG EXIF information display - jhead is a great little tool

Posted: Fri 11 Jan 2008, 00:24
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

Posted: Tue 15 Jan 2008, 00:15
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?

Posted: Tue 15 Jan 2008, 03:23
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).

Posted: Tue 15 Jan 2008, 09:45
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?

Posted: Tue 15 Jan 2008, 10:33
by GeoffS
jhead is very nice, runs perfectly under Puppy 2.12 on this old IBM 600E.
Thanks jeffrey
Geoff

Posted: Sat 19 Jan 2008, 02:18
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.

Posted: Sat 02 Feb 2008, 06:13
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)

Posted: Sun 03 Feb 2008, 10:25
by zygo
disciple,

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

Posted: Mon 04 Feb 2008, 07:30
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.

Posted: Mon 04 Feb 2008, 14:09
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.)

Posted: Tue 05 Feb 2008, 04:22
by disciple
I understood Barry was putting gimageview in Puppy, and I think it reads exif information.

Posted: Tue 05 Feb 2008, 06:18
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.

Posted: Tue 05 Feb 2008, 06:48
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 =-

Posted: Sun 25 Oct 2009, 17:47
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

Posted: Sun 25 Oct 2009, 20:03
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 "$@"

Posted: Sun 25 Oct 2009, 22:00
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.

Posted: Sun 25 Oct 2009, 22:37
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.

Posted: Mon 26 Oct 2009, 21:13
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?

exif info

Posted: Thu 10 Dec 2009, 14:01
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).

Posted: Sun 16 May 2010, 08:17
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!