# How to add missing lens data to image Exif?



## aster (May 28, 2011)

Likely Sony camera a700 doesn't recognize several lenses and LR 3.3 doesn't display name of these lens. For example Tokina 11-16 mm.
How to add to original image file Exif lens Metadata?

Because LR database isn't lasting forever, using keywords is not enaough long lasting solution.

Perhaps there is some LR plugin, to write lens name to image file?

Thanks!


----------



## aster (May 29, 2011)

I have spent some more time investigating the problem but still I'm not closer to answers.
It appears that with the same camera sometimes LR data of certain lens is present and sometimes missing.
Is it just camera specific failure or possibly an ordinary LR bug?
May be that LR fails to index properly jpeg+raw pairs?
It may be difficult to find such errors, as I have find these also half occasionally.
Thanks!


----------



## clee01l (May 29, 2011)

Aster,  take a look at the EXIF headers of the problem images outside of Lightroom   You can use a tool for viewing and updating the EXIF called EXIFtool By Phol Harvey.  There is a GUI version  Here http://freeweb.siol.net/hrastni3/foto/exif/exiftoolgui.htm  that is a little easier for non-geeks to manage.  
When you view the image using EXIF tool you should see if the lens information is present before LR gets it on import.  If it is not present, you can use the EXIFtool to update the file header befpre you import it into LR.


----------



## aster (May 30, 2011)

Thanks for the link. Exiftool appears to describe Lens twice and I believe that both are wrong lens types, because at this date I didn't have these lenses.
below is a short extract from Exiftools:
File Name                       : DSC01353.JPG
Directory                       : F:/photos/dph10/2007.11.24_raba
File Size                       : 3.7 MB
File Modification Date/Time     : 2010:09:17 17:23:15+03:00
Lens Type                       : Minolta/Sony AF 24-105mm F3.5-4.5 (D) or Sigma
Lens ID                         : Tamron SP AF 28-75mm F2.8 XR Di (IF) Macro

I believe the correct lens should be Sigma  24-60mm/F2.8 DG

Looks like lens data often isn't valid or applications don't know don't know how to interpret this field.
In some files both are also correctly identified and looks like then also LR displays these values.


----------



## clee01l (May 30, 2011)

aster said:


> ...below is a short extract from Exiftools:
> File Name                       : DSC01353.JPG
> ...
> Lens Type                       : Minolta/Sony AF 24-105mm F3.5-4.5 (D) or Sigma
> ...


 From your EXIFtool report, I can't tell what is going on either.  If I run one of my images through EXIFtool GUI, I get a number string (4 52 ) in the Lens ID field.   I have also run the same image file through PhotoMe (http://www.photome.de)  You might try running the same image file through PhotoMe and see if the results are consistent with  EXIFtool.   From what you have reported, It does appear that your A7-- is not writing correct information into the file header when it writes the file  to the camera card. 

I am assuming that all your image files were also imported into LR. Since they are JPEG, LR could update the metadata on the original file.  As an additional test, you might do the following:

Update your Camera Firmware to the latest revision if it isn't already.
Process image files that are still on the card using EXIFtool/PhotoMe
Shoot a RAW image file  And A JPEG image file and compare in  EXIFtool/PhotoMe

If you could then report those results we can have more evidence that it is indeed a camera problem.


----------



## aster (May 30, 2011)

Photome reports of the same file: Sigma 17-70mm F2.8-4.5 (D) or Tamron SP AF 28-75mm F2.8 XR Di (IF) Macro
Obviously there is used lookup table mixed with guesswork. Upon these results it looks problem is with interpretation of this field content, whatever there is, as you mentioned an ID number instead of lens name.
While Exiftool offered 3rd Lens Type  : Minolta/Sony AF 24-105mm F3.5-4.5 (D) or Sigma.

Without being able to see the lens ID field real content in exif, it's difficult to troubleshoot problem. 
Newer Sony lenses are displayed correctly in LR only from ARW and not present from jpg, while Photome can read Lens type correctly from raw and jpg.
My camera usually has a last FW and so it's also now.


----------



## aster (May 31, 2011)

I have obtained now measures to check Exif and it appears, that correct Lens ID data often is present in Exif but LR doesn't read and displays it.
For example I have a 8000 photos folder where 5000 files are with recognized lens and 3000 with unknown lens. When checking these unknown ones, it appears these are with the same lens ID as known ones. That's in metadata filters, where it's most easy to notice that something is wrong with lens ID's, without going through all photos


Am I alone who's LR 3.3 metadata filters represent huge percent of "unknown" lens ID??? Obviously yes, as no one didn't confirmed the problem


----------



## clee01l (May 31, 2011)

It is possible that the problem is limited to Sony files or even A700 files.   I do note that the EXIF specification in its last revision 2.3  (Translation April 2010) http://www.cipa.jp/english/hyoujunka/kikaku/pdf/DC-008-2010_E.pdf did mention changes in this Len specification.


----------

