RT and lens data EXIF in Info.

Two JPEG files where I have edited the EXIF but only one reads correctly in info when I open in RT 5.6 (Win 7 64bit). Both are read correctly in PhotoMe and on flickr. Not causing a problem because I don’t use any lens corrections, just puzzled. In metadata tab in RT exif for lens make & model are as I edited.

Images are here: https://filebin.net/32e69fynlizavs23

To clarify, one image is taken with a Konica Hexanon AR 100/2.8 which shows correctly in RT, the other image is taken with Nikon Series E 100/2.8 but RT lists 5 possible lenses (Sony and Sigma).
Screenshots of the info in RT:

confused%20exif correct%20exif

Both image files edited for EXIF in the same application.

RawTherapee’s lens info derives from ExifTool, and ExifTool shows the same:

$ exiftool -G0 DSC00074-1.jpg | grep -ai lens
[EXIF]          Lens Make                       : Nikon
[EXIF]          Lens Model                      : Series E 100mm 1:2.8
[MakerNotes]    Lens Format                     : Unknown
[MakerNotes]    Lens Mount                      : Unknown
[MakerNotes]    Lens Zoom Position              : 0%
[MakerNotes]    Lens Type                       : E-Mount, T-Mount, Other Lens or no lens
[XMP]           Lens                            : Series E 100mm 1:2.8
[Composite]     Lens ID                         : Sony FE 100mm F2.8 STF GM OSS or Sony FE 70-200mm F2.8 GM OSS or Sony FE 70-200mm F2.8 GM OSS + 1.4X Teleconverter or Sony FE 70-200mm F2.8 GM OSS + 2X Teleconverter or Sigma 70-200mm F2.8 DG OS HSM | S

To understand why you see an array of possible lenses, you would need to look into ExifTool.

There is a branch of RawTherapee metadata-exiv2 which uses Exiv2, and that shows only your manually-edited lens.

1 Like

@Morgan_Hardwood - thanks, will focus my attention on ExifTool then. I used ExifTool with a GUI so will see if I can edit those other fields but have a feeling I won’t be able to but will experiment with other Lens Model names to see how and why the other Lens entries change.

With my currently very primitive understanding of this mechanism, it seems the lens info in the JPEG file contains a numeric ID which matches many possible lenses, then further refinement is performed based on aperture and perhaps other parameters. The matching seems to work fine. What you want is a change in hierarchy - if the LensModel tag is set, use that instead of the LensID (which is a composite tag, you can’t edit it), and that is probably a request for RawTherapee and not for ExifTool. However, since RawTherapee is (hopefully?) switching over to Exiv2 in 5.7, there is no need to open an issue - it already works in the latest metadata-exiv2 branch.


Will keep trying without the GUI this time to see why one file using the Konica lens works fine and does not offer up that “array of possible lenses” under Lens ID. Must have done something different.

I amended the thread title because my tests showed me that it was when I edited EXIF a second time in PhotoMe that all that other lens nonsense appeared in the EXIF in the Composite section which RT quite correctly read. (reason I re-edited in PhotoMe was to input a correct max aperture which my exiftool + GUI wasn’t applying so I will stop doing that as the max aperture is in my Lens Model name) :exploding_head:

@mannikon I asked Phil Harvey, the author of ExifTool, how ExifTool comes up with the composite Lens ID, and he kindly explained, and wrote:

To properly set this lens requires two separate ExifTool commands:

  1. exiftool -lensmount=E-mount FILE
  2. exiftool -lenstype2=32819 FILE

The value of the LensMount tag affects how LensType2 is interpreted, so it must be written first.

1 Like

@Morgan_Hardwood - thank you! More grist for my mill :wink: