Feature #8995

Auto-crop after Distortion Correction

Added by Rick Gabriel over 7 years ago.

Closed: invalid
Target version:
Start date:
Due date:
% Done:


Estimated time:
Affected Version:
hardware architecture:


After correcting distortion with the Lens Correction module, black areas can often appear around the edges of the image, especially the corners. Obviously this is an unavoidable side effect. However, I suggest the image be automatically cropped to the maximum usable area if such an artifact occurs and cropping hasn't been already set manually. This is the typical behavior in other software such as Aftershot Pro.


#1 Updated by Johannes Hanika over 7 years ago

  • Status changed from New to Closed: invalid

there is a little icon to the right of the scale slider, which computes the auto-scale (maximum without black borders) which uses a function in liblensfun to compute this value. this should actually be computed automatically if you change distortion settings.

if that doesn't work correctly it's a bug in dt (feel free to re-open this ticket accordingly with an example image maybe, please also state the version of dt you're working with) or if it computes a scale and the value is wrong it's a bug in liblensfun.

#2 Updated by Rick Gabriel over 7 years ago

Thanks. I found the "auto scale" icon. It does work when clicked, but it is not activated automatically after distortion corrections are enabled. For example, I have a photo shot with a Canon 24-70mm f/2.8 lens @ 70mm. When I click the icon to enable lens correction, the distortion is fixed but there are black areas around the image especially in the corners. It is not cropped or scaled automatically. If I then click the "auto scale" icon, the image is cropped to the maximum usable area properly. If the intended behavior is to scale/crop automatically after distortion correction is enabled, it's not working as designed. There is a workaround though.

#3 Updated by Torsten Bronger over 7 years ago

I always click on the mentioned small icon after having activated distortion correction. I think it would be sensible if this was implicitly done, and you would set the scaling it back to "1.0" if you really needed that. In most cases, though, people will want the image to be scaled to the maximal size without black border areas, I think.

Also available in: Atom PDF

Go to top