Help with Lensfun (as a dev)

How do you, uh, actually use lensfun?

I’m having a hard time figuring out what information I need to give, what functionality it provides and what I need to code up myself…

Here’s my routine in rawproc:

The actual lensfun “fun” starts at 530, and is to the old API, 0.3.2 IIRC. You can do each modification separately, or the lfModifier allows one to combine chromatic abberation and distortion in one pass.

I had to code up GetR(float x, float y), GetG(float x, float y), and GetB(float x, float y) methods for my image library; there is an expectation of an interpolation to get the correct pixel, and I just got the nearest neighbor to start. I’ll do a better interpolation in rawproc2… :smiley:

1 Like

Have you seen the docs? I always thought they contain everything you need afaik, including sample code
https://lensfun.github.io/manual/v0.3.2/