Skip to main content
Adobe Photoshop Family

53 Messages


872 Points

Mon, Mar 27, 2017 8:16 PM

Lightroom 2015.8/9: Lens Info wrongly exported/imported

Hey there Adobe,
I stumbled over a curious behavior regarding Lens Metadata.
When I first imported a batch of photos, all lenses were recognized as they should be, specifically my 10-20 Sigma which sows up (if I want to filter for metadata) as "10.0-20.0 mm f/4.0-5.6". Rather precise (I like it :-)), but as always lacking the manufacturer (that's a different topic, but imagine me having 50 mm f/1.8 lenses from different manufacturers, how to tell them apart?).
I had a couple of shots with said lens which I wanted to combine to a panorama. I had to do this by a round trip to Microsoft ICE, since neither LR nor PS were able to give me the results I wanted. To do so, I exported the images as .tif and combined them in ICE. Now, ICE is a bit weird when it comes to metadata. It refuses to save such things as lens, iso, apperture. There might be a sound reason behind this (probably that the composite image does not reflect the single image characteristics of a lens and / or exposure), but one has exiftool for that, if one wants to have tidy metadata. (I personally like to know later on, what setting I took the panoramic shots with). So I copied the metadata from my raw file (.NEF) to the pano's .tif and read the metadata from the pano into LR. And then the shock: The lens showed up as: "10-20mm f/4-5.6" Note the absence of the space betwen focal length and unit as well as the missing trailing zeroes.
If I want to filter for all shots taken with this one lens I have to consider two different filter settings. I think you can understand that I'm not all that happy.
I did some digging around in the exifs (wrote exif dumps from the original, one exported file and the pano (after the copying to) to textfiles) and found this:

Identifier | Original .NEF | Exported .tif | Imported and copied-to pano .tif
Lens | : 10-20mm f/4-5.6 | : 10.0-20.0 mm f/4.0-5.6 | : 10-20mm f/4-5.6
Lens | : 10-20mm f/4-5.6 G |  | : 10-20mm f/4-5.6
Lens |  |  | : 10-20mm f/4-5.6 G
Lens Data Version | 0204 |  | 0204
Lens F Stops | : 5.00 |  | : 5.00
Lens F Stops | : 5.00 |  | : 5.00
Lens ID |  | 249 | 
Lens ID | Sigma 10-20mm F4-5.6 EX DC HSM | Sigma 10-20mm F4-5.6 EX DC HSM | Sigma 10-20mm F4-5.6 EX DC HSM
Lens ID Number | : 249 |  | : 249
Lens Info |  | 10-20mm f/4-5.6 | 
Lens Info |  | 10-20mm f/4-5.6 | 
Lens Model |  | : 10.0-20.0 mm f/4.0-5.6 | 
Lens Type | G |  | G

(I tried to mimic columns by inserting | )

What I read from this is: All values I copied from the original to the pano are there. So there should be no problem for LR to identify the the lens the same way, wouldn't you agree? The exported .tif shows the values I can see inside LR. If I import the exported .tif, all values show up as they should be. What boggles me is the following: While exporting LR wrote the "Lens ID" field twice. once containing the "Lens ID Number" (and not writing it in that tag!) and once the correct name of the lens. The "Lens ID Number" is not written and seemingly ignored on import of a .tif. Also there is an abundance of "Lens Info" with the description I don't want so see in LR but what is shown for the pano. "Lens Model" then contains the correct description.

My guess would be, that you should have a thorough check of your metadata-import routine, there might be something wonky in there. I have the complete exif-dump still saved if you want me to upload it as a csv or excel sheet.

I would really appreciate it to hear back from you. Although it is not that HUGE an issue, it is unsettling. When I write Lens-Info to scans of analog scanned photos or images taken on a mirrorless with an adapted manual lens, I for example use: "exiftool -Lens="Minolta 135 F2.8 MD Tele Rokkor" -ApertureValue="2.8" -FNumber="2.8" -FocalLength="135" IMG_0344.CR2" and everything shows up fine inside LR.

Best Reagrds


53 Messages


872 Points

4 years ago

I just stumbled upon another instance where this problem occurs and "reproduced" it with a clean and empty catalog.
I imported just one .NEF into said catalog and of course it showed the correct lens information: "18.0-35.0mm f/1.8". Here are all metadata containing "Lens" (grabbed with: exiftool "-*lens*" DSC_7487.NEF):

Lens Type                       : G
Lens                            : 18-35mm f/1.8
Lens Data Version               : 0204
Lens ID Number                  : 139
Lens F Stops                    : 6.33
Lens ID                         : Sigma 18-35mm F1.8 DC HSM
Lens Spec                       : 18-35mm f/1.8 G

As you can see, the displayed lens information is nowhere to be found in the metadata.
I then went on to edit said image in photoshop, the result was stacked with the original in the catalog and the lens information showed up alright (if I filter by metadata, I now have two images with this lens). The resulting .tif's metadata is as follows:

Lens                            : 18.0-35.0 mm f/1.8
Lens Profile Enable             : 1
Lens Manual Distortion Amount   : 0
Lens Profile Setup              : Auto
Lens Profile Name               : Adobe (SIGMA 18-35mm F1.8 DC HSM A013, NIKON CORPORATION)
Lens Profile Filename           : NIKON CORPORATION (SIGMA 18-35mm F1.8 DC HSM A013) - RAW.lcp
Lens Profile Digest             : 83E11483819921EEA08DEBDE8634FB03
Lens Profile Distortion Scale   : 100
Lens Profile Chromatic Aberration Scale: 100
Lens Profile Vignetting Scale   : 100
Lens Info                       : 18-35mm f/1.8
Lens Model                      : 18.0-35.0 mm f/1.8
Lens ID                         : Sigma 18-35mm F1.8 DC HSM

Now it starts to get interesting. Some Lens-Tags get discarded (Lens ID Number, Lens Data Version, Lens Type, Lens F Stops and Lens Spec), some get altered (Lens ), some stay the same (Lens ID) and the rest gets added. The curious bit here is that Lens and Lens Model now both reflect a value that is correct for the lens but has to be created by PS/LR, since it is not there in the original file.
If I instead export my .NEF as a .tif, and re-import it, everything is the same as an "Edit in Photoshop", so there seems to be the same sort of mechanics working in the background metadata-wise, they are identical, no need to re-paste them here.

Next I passed the NEF into DeepSkyStacker (as a representative for an external editing program) and got an "Autosave.tif" which contains no metadata (Lens-wise) whatsoever. Seems like a shame, but understandable. If imported into Lightroom it shows up with "Unknown Camera" and "Unknown Lens". Fair enough.
My testing didn't end there. I made a copy of said "Autosave.tif" and renamed it "AutosaveCopy". I then did a quick "exiftool -tagsfromfile DSC_7487.NEF AutosaveCopy.tif", which according to Section 9a here should copy all metadate from the .NEF to the .tif and place it in the correct place where it belongs. Importing this file gives me - and here comes the annoying part - a second lens. Suddenly I have shot this image with an "18-35 f/1.8". Note the absence of trailing ".0"'s. This is clattering my metadata-filter and is quite annoying. Grabbing the metadata gives:

Lens Type                       : G
Lens                            : 18-35mm f/1.8
Lens Data Version               : 0204
Lens ID Number                  : 139
Lens F Stops                    : 6.33
Lens ID                         : Sigma 18-35mm F1.8 DC HSM
Lens Spec                       : 18-35mm f/1.8 G

which is identical to what my .NEF offered.
If I however make another copy "AutosavedWithModel.tif" and copy the metadata from my "EditedInPhotoshop.tif" I end up with the according set of metadata AND the correct lens designation in the metadata sorting of my catalog.

My conclusion is thus as follows:
LR treats RAW-files differently than already processed images (.tif for example). From a RAW (.NEF specifically) all lens information is used to create a metadata designation internal to LR which of course will be exported (nothing wrong with that). If however the metadata in an already processed images mirrors the metadata of the .NEF, it is taken "as is", thus messing up the easy way to organize things.

I would be very happy if Adobe could
a) reproduce the issue
b) acknowledge that this is sort of wonky
c) confirm that this is expected behavior (boo!) or a bug (fixable :) )
d) do something about it. (Hey, this might be the root cause for all the performance issues, one never knows ;) )

I can upload my test catalog and the offending files if that will be of help to anyone.
Until then I remain rather exasperated...