Canon Lens Exif Data

ancker

Joined: 2008-03-04
Posts: 2
Posted: Tue, 2008-03-04 22:12

Hello,

I'd like to display the Lens that was used to take the photo in my Exif Pane.
I know the data is there, but it seems Gallery isn't looking for it.

I know I probably need to edit /modules/exif/lib/exifer/makers/canon.inc but I have no idea what to add to make it grab the Lens information.

I'm sure I'm not the only one that has requested this. I found another post but it was specific to Nikon cameras and likely won't work for me.

thanks

/ancker

 
ancker

Joined: 2008-03-04
Posts: 2
Posted: Wed, 2008-03-05 21:45

After some prodding around, I solved this on my own!

edit gallery/modules/exif/classes/ExifHelper.class
and add the following at the bottom before "return $data;"
(Use Lens Info below because there is already International translations for it in the i18n stuff in Gallery)

/* Lens Type additions */
$data['LensType'] =
array($gallery->i18n('Lens Info'), 'SubIFD.MakerNote.LensType');
/* End Lens Type additions */

THEN

edit /gallery/modules/exif/lib/exifer/makers/canon.inc
look for "switch($tag)" and add the following case
case "0095": $tag = "LensType";break;

That's it!

Go to the Exif Plugin and add "Lens Info" to your Summary or Detailed view. Then view an image that has this Exif Tag populated.

/ancker

 
patrickthickey
patrickthickey's picture

Joined: 2004-08-22
Posts: 164
Posted: Thu, 2008-03-13 15:54

This is very cool. Thank you for taking the time to post the details. Much appreciated.

regards,

patrick

http://www.idyll.com

 
ckdake
ckdake's picture

Joined: 2004-02-18
Posts: 2240
Posted: Mon, 2008-06-09 01:14

Cool! This worked for me. Awesome.

____
http://ckdake.com/ - If you found my help useful, please consider donating to Gallery.