Lensfun, Exiv, Windows

[My apologies, I sent the last too soon.]

I found the xml file. Below I include the entry for the AI-S lens. After that I include the exact same but for lens name changed. Could I be doing something wrong?

-

Nikon

Nikon AI-S Nikkor 55mm f/2.8 Micro

Nikkor AI-S 55mm f/2.8 Micro

Nikon F AI-S

1.528

-

-

Nikon

Nikon AI-S Nikkor 55mm f/2.8 Micro

Nikkor AI-S 55mm f/2.8 Micro

Nikon F AI-S

1

-

What I intend to add

-

Nikon

AF Micro-Nikkor AF 55mm f/2.8

AF Micro-Nikkor AF 55mm f/2.8

Nikon F AI-S

1.528

-

-

Nikon

Nikon AF Micro-Nikkor AF 55mm f/2.8

AF Micro-Nikkor AF 55mm f/2.8

Nikon F AI-S

1

-

Marked text

And this is only the translation to English.

Next time you update Lensfun everything will be back to as it was before.

Btw, the profile uses only one parameter for distortion correction. If you create a new one yourself you will get three.

Yes, good, that’d work.
Yes, I understand the edit is local. At next update of DT I’d have to redo this…

So I bring up XML Notepad, make the edit, and try to save file…only to run into:

XML Notepad Save Error Access to path is denied.

So, as a user in Windows 10, how do I force the save to go through?

Perhaps copy to desktop, edit it there and move the new copy back?

This probably doesn’t help, most distros/packaging are using the old lensfun version, 0.3.2. However, 0.3.95 and on have a UserLocation where one can put their own .xml files which are prioritized above the installed database.

https://lensfun.github.io/manual/v0.3.95/dbsearch.html

So I saved to desktop and successfully moved the edited file back to the darktable/share/lensfun folder as slr-nikon.xml file. File attached. [Not sure why file not being attached]
I then brought up darktable…and find it shows the same warning with the inverted triangle and “camera/lens not found”.

Trying to upload an xml file as attachment to this posting I run into this:
Sorry, the file you are trying to upload is not authorized (authorized extensions: jpg, jpeg, png, gif, ico, dtstyle, txt, scm, pp3, svg, xmp, bz2, xcfbz2, py, arw, apng, orf, cr2, nef, dng, tif, patch, zip, 7z, rtc, raw, exr, hdr, raf, rw2, pfi, xcf, xcf, pef, icc, icm, pto, blend, dcp, xcfxz, xcfxz, ods, mp4, mkv, ogv, webm, cr2, nef, dng, cr2, pdf, kra, ntp, arp, fits, seq, gz, ssf, cr3, heif, heic, avif, crw, dtpreset, nrw, cfg)
Trying again having saved the xml file as “all files”…

No luck trying to upload the xml here…no matter what type I save it as …

Darktable won’t build with .95 as of 4.2

You zip the file to upload it here.
And did you refresh Exif in darktable? I think I have the part about hitting refresh in the YouTube video I uploaded.

Peter, I find your response very precise and helpful.
Attached the zip of the xml file.

No, I did not refres the Exif in darktable. If you could please clarify how I’d do that here. Meanwhile I shall search on Youtube…
slr-nikon.zip (52.4 KB)

Meanwhile I did follow up on:

i.e., I created a lensfun folder, and as a contingency also a version_1 subfolder, and copied the (edited) slr-nikon.xml file into both folders.

You didn’t check which part I marked. You changed the one for crop sensor and not full frame.

[I confess, I haven’t edited an xml before and hence the glitch]

I searched for and replaced all
Nikon AI-S Nikkor 55mm f/2.8 Micro
with
Nikon AF Micro-Nikkor 55mm f/2.8

Is the attached xml good to go? if it is, should I copy it back to the darktable/lensfun folder? also copy to the AppData/Local/lensfun and version_1 folders?
slr-nikon.zip (52.4 KB)

Seems fine.

C:\Program Files\darktable\share\lensfun\version_1 I suppose.

And don’t forget to refresh in lightable later. Mark your pictures in lightable, up right and refresh exif.

Yes, I copied the file over to C:\Program Files\darktable\share\lensfun\version_1
I created a new folder “Test” and copied into it an image taken with the 55mm lens in question.
I renamed the image to something entirely new.
I fired up DT.
[I suppose by doing that the prior history (including exif data) of the same image with DT is rendered irrelevant. From DT’s perspective it’d be a new folder, new image etc all with new names.]

On turning on Lens Correction I still get the “camera/lens not found” message/error.
The lens shows up fine.
The camera model is however blank. It used to have my camera and model before (and does with other lens).
What’s puzzling also: if I click on the field for the camera model I get a list of Nikon cameras. They are limited however to the Coolpix and Z (i.e., mirrorless) lines. I don’t find the DSLR lines…

Sounds like the file structure is broken for slr-nikon.xml. I will send you one.

Sorry, no time to start my computer this night. It has to be tomorrow instead. Anyway, your Windows wordpad is probably the culprit when it resaved the file.

Peter: I’d like to agree with you and place the blame on Windows Notepad for damaging the xml file. Although it’s also possible I contributed to it some (or maybe more than some).

No worries, Peter.
I can and shall wait for when you free up and are able to send me the file to replace the damaged one.
Since I don’t have/use an AI-S 55mm I expect the corrected file you send me to be copied over every time I update DT (at least until this issue is fixed in exiv2/lensfun…)

Uploaded. But what about the mount? I know about Canon mounts but have no idea about Nikon.
slr-nikon.zip (38.3 KB)

Peter, the file you sent me does not generate the “camera/lens not found” warning when I turn on Lens Correction. In my limited understanding of DT I believe this means what you sent me works well and is accepted by DT. I don’t see any change in the waveform when I turn on Lens Correction but perhaps that’s the wrong place to see if any correction (very small, as can be expected) occurred.

I can’t answer your Q re the mount. However it never came up before with DT concerning my other Nikon lens, hasn’t come up with the 55mm before or now (with the new slr-nikon.xml file), so unless I’m told I’m mistaken, I shall assume my issue is now resolved.

My gratitude and appreciation for your help in resolving this issue. Thank you again.