Exporting from diffuse or sharpen

If I apply the add local contrast preset the image looks fine on screen, but when I export the file the setting is not applied. If I instead opt for the fast local contrast preset, the output file is slightly affected, but to a far lesser degree than it appears on screen.

I was originally seeing the error message “tiling failed for module diffuse output may be garbled” during export. I stopped that message appearing by changing the setting host memory limit (in MB) for tiling to 0, which apparently disables the limit.

Windows 10 with darktable 3.8. i5 3.0GHz CPU and 16.0GB RAM

I think you should provide the darktable log file. You get it via terminal execution darktable -d all

Since you are in windows, check that you dont have OpenCL combability installed. It has given us some trouble in the past. Settings, App, App and Feature, App List and search for OpenCL.

First of all, you need to compare preview and export at 1:1 scale (full size resolution). As much as I have tried to make the output scale-invariant, there is no such thing as fractional pixels, so filter sizes get rounded to the closest integer and that may introduce discrepancies.

Then, if it’s a memory issue, try reducing the radius used in the module. That should help by reducing the numbers of scales aka buffers.

Log file…

darktable-log.txt (1.1 MB)

OpenCL Compatibility is not installed.

The left image is what I see in darktable and the right is the exported jpg (at 100%)…

PS I deleted the original log file. Opened darktable from Terminal as above, applied the add local contrast preset from the diffuse or sharpen module to image DSC07145 (a.k.a. 773), exported the image to 100% JPEG then closed darktable.

PPS Ignore the above photo comparison. I was using an old viewer that degrades images in shrunken windows.

This comparison is of JPGs without (left) and with (right) the add local contrast preset applied…

Sorry for waking this topic from the dead but after the introduction of the high quality processing mode in DT, this odd diffuse and sharpen module behavior became a lot more clear.
See these two pictures:

Both are cropped PNG screenshots of what I see in DT. The first one is the standard quality preview, the second is with the high quality processing mode turned on.

If you find it hard to notice the difference, see the ceiling light edge.

Here’s a diff:

The issue with this is that in the standard mode, the effect is way more pronounced than when the image gets exported. In my case, this has always led to entire albums of dull images, and I had no idea why that was.

It behaves the same with and without OpenCL turned on, and I’m on Windows 10, master branch build 28f3414f3c. But I’ve seen the module doing this way before the current build.

Is this bug-report-worthy?

What setting are you exporting with…if you choose no for HQR export setting is it not a closer match to the export… ie standard preview mode = no , HQR = HQ preview mode…

Also it might be worth noting that scaling might impact this so really the only true comparison will be at 1:1 …zoomed out DT and or other software might use different scaling aligo’s… I am not sure what option you use in DT but you might see if there is any difference between. I think I use bicubic for both …I’m not at home to check my preferences but I suspect the different scaling aligo’s might be affected by this duality more or differently than others…

EDIT:

I am not sure if it will show but you can see zoomed out there is an obvious difference in the flower and the head and shoulder of the bird when you toggle the preview mode …but at 100% very little difference… generally matching the settings (as noted above) in the export with the preview version that you used should make things pretty close…

Let’s not talk export then. That’s only a consequence of what I’m trying to demonstrate here.

As far as I know, fully zoomed in it’s always a high quality preview, so it cannot be used to evaluate the difference. It’s clearly visible in shadows where if I add some local contrast, details get lost in the preview but reappear as soon as I zoom in.

I find this quirk to be quite an issue. I cannot export literally hundreds of photos and then try again if I find them dull all of a sudden. :frowning:

You didn’t say what your export setting was??

I’m not sure what you mean by this.

My point has little to do with pixel interpolation. I’m talking much more pronounced diffuse or sharpen effect in standard vs high quality preview. And high quality preview is very close to what my exports look like, although there’s certainly a minor difference caused by rescaling.

I’m sorry but what do you mean by that with regards to the module behavior?

1 Like

Lighttable → Export → High quality resampling → yes or no ?

1 Like

Okay I think I see what you are saying. Here I have grabbed a recent playraw…basic sigmoid and lens correction and then one of my Diffuse or Sharpen presets… Clearly the visual impact is stronger on the standard preview when you toggle the module on and off and yet both exports look closer to the HQ preview when exported with either yes or no at least in my test with this image…

I think your point has everything to do with pixel interpolation, otherwise there should be no difference between normal and high quality preview.
The normal preview works (afaik) on a downscaled and cropped version of the image to speed up processing. Many (most) modules work on pixels independantly, so downscaling doesn’t have a large influence. “Diffuse or sharpen” explicitly uses the values of neighbouring pixels. If you change the scale, you can change the values of those neighbouring pixels.

The manual explicitly states that scaling has an influence:

@pehar
That pixel interpolation setting is applied when exporting a resized image.

@rvietor
By pixel interpolation I meant what happens after export when resizing the result, or in darkroom preview. Otherwise you’re very likely right.

@priort
Yes, this it exactly what I meant.

1 Like