This module has always been in the pixel pipeline but was hidden in darktable GUI. Ansel 0.0 exposes it to allow users to fix a mistake in the default pipeline order of darktable.


When exporting images to save them to a file, the picture is processed at full resolution and then rescaled to the specified output size by this module.

Final resampling is never used when producing previews, for the lighttable thumbnails or in the darkroom, because in this case images are resampled earlier in the pipeline, for better rendering speed. It has no effect if the image is exported at its full (original) resolution either.


In darktable legacy pipeline order as well as in the darktable v3.0 default pipeline order, the final resampling is positionned after the output color profile, which means it resamples RGB data encoded with an OETF  (improperly called “gamma” in ICC color profiles), meaning it processes non-linear RGB.

Resampling non-linear RGB is known to create artifacts such as fringes around sharp and contrasted edges, and should be avoided in general. However, in a majority of cases, it makes no perceptible difference, especially when processing low-dynamic-range images.


Ansel exposes the GUI widget of the final resampling module to give users the opportunity to correct themselves the position of the module in the pipeline, pending a new default pipeline order.

It is recommanded to place the final resampling before the output color profile module, and even before filmic for best results.


The type of interpolation used for this final rescaling is defined globally in the software, in the preferences, under the pixel interpolator (scaling) parameter. Bilinear is safe, fast and robust but will typically be slightly blurrier. Bicubic offers the best all-around quality/cost ratio. Lanczos interpolator are the sharpest but are known to overshoot  at very contrasty edges and may create ringing.


A common practice is to apply some sharpening after the downsampling. Ansel does not do it by default, but you can by duplicating an instance of diffuse and sharpen, sharpen or contrast equalizer and moving it after (above) the final resampling module. In that case, ensure final resampling is before the display view transform (filmic or the base curve) such that your sharpening instance can go in-between. You should also avoid re-sharpening when using Lanczos intepolators (it may worsen its typical artifacts if any) and keep your sharpening at the pixel level, with a radius of 1-2 px maximum.