Would there be value in designing Darktables levels to function more like GIMP's

I look at the limited functionality of rgb levels in Darktable and long for the levels I am used to from working with GIMP. To understand my comments, open GIMP and explore the options there. Also if you have a color faded scanned image auto levels often does a great recovery job.

I am not asking DT to do everything that GIMP or any other program does, but the levels adjustments are disappointing for my needs. BTW, the split view in many of GIMPs modules is a nice touch too. I appreciate I get a similar guide by using snapshots in DT.

a split view is already in place in darktable - just select a snapshot and you can use i - even rotate the separating line. (See darktable 4.2 user manual - snapshots)

In darktable tools are integrated when there’s an improvement over separate modules at different positions in the pipe (e.g. highlight reconstruction in filmic rgb)

Gimp levels tool seems to combine levels and tone curves, also some kind of white balancing - so stuff you need to integrate several modules that are now at different places of the pixelpipe.
So I doubt there’s more value than having redundant functions doing stuff in an inferior way

GIMP seems to be purely display-referred. I don’t think there’s much interest in developing for that anymore, as scene-referred works better for this kind of functions, while being a lot less artifact-prone.

Add to that a difference in philosophy, where dt uses “simple” tools (at least conceptually) that do one thing, while GIMP’s tools seem to do several things.

As for your request, if you want some new functionality, it might be better to say what exactly you want. Telling the devs to “open GIMP and explore the options there” isn’t very specific about what you want transplanted to dt. Just opening a program you are not familiar with to see how part of it works most likely makes you miss the interesting features…

1 Like

I am not really asking for a feature request here. I am just trying to have a discussion about a feature i find helpful in gimp and wonder if there is any value trying to change or improve levels in DT. I am just respecting the good responses present here. BTW, i rarely if ever use levels in Darktable and instead use rgb curves which can achieve a lot of what i use levels for in gimp. I mainly use gimp for photo restoration. I am not asking developers to waste time on features with little or no value. The answers here suggest that the answer to my question is a resounding no. Thanks for the feedback.

Levels/RGB Levels

These two are working as they should, no problem with that. But when you look at the code, you can see that it duplicates exactly the slope/offset/power mode of the color balance module. The white point is scaled by a simple exposure correction, such as the slope factor or even the exposure of the exposure module. The black point is adjusted by adding a constant, such as the factor of the offset, or the black level correction of the exposure module. The grey point is adjusted by a power function (sometimes improperly called gamma), just like the power factor of the color balance. They are not just the same features, they are exactly the same math. The difference is therefore not only in ergonomics, but also in the fact that the color balance gives you the numerical value settings, making them more easily transferable from one image to another or from one application to another. Curves and levels also assume you work SDR images, with data encoded between 0 and 1. If you work HDR pictures or raised the exposure quite a lot earlier in the pipe, the pixel values will not be clipped, but the GUI will not give you control over the pixels above 1 (or 100 %).

If you already use the color balance, there is no need to add an additional level module. Finish your retouching in the same module.

Curves/RGB Curves

These also work well, but considering their classic use … are they really useful? Usually they are used to add/remove brightness, which falls in the same use case as the grey of the levels module or the power of the color balance module, or to add/remove contrast, which can be adjusted or by decreasing/increasing the interval between white and black (in a linear way) or by applying a non-linear brightness compression, again available from color balance.

Curve ergonomics is a real problem in an RGB linear workflow, because the middle gray is assumed to be in the center of the graph, which therefore assumes that we are working in non-linear RGB (where the gray at has been increased to 50%). In a linear encoding, the standard medium grey is expected at 18% (but the practice depends or where you anchored your exposure in camera), and the contrast control around this value not being centered on the graph becomes complex in the interface. In addition, the graph of the curves assumes a limited RGB signal between the values 0 and 100% (or 1)… 100% of What? White screen luminance. In a linear workflow, the HDR signal can go from 0 to infinity, and it is at filmic RGB step that we’re in charge of putting everything back between 0 and 100% of the white screen.

The contrast in the color balance module is compatible with this approach using the contrast fulcrum parameter, which allows the selection of the contrast reference. Thus when changing the contrast, we increase the light above the fulcrum, and reduce it below, but the fulcrum remains unchanged. The display workflow (in Lab or non-linear RGB) always has the implicit assumption that gray is 50%, uses it as a contrast reference, and doesn’t allow you to change that value.

Prefer color balance.

From here:

@Donatzsky thank you for your detailed response and great information. I already really embrace the color balance module and you have given me more information and motivation. One use i have for rgb curves is small color tweaks which I can find easier than fine tuning other modules intended for this purpose. Again thanks for the thoughtful reply.

Do you have any examples?

@s7habo This might be some good subjects for future videos.

I have already done it here:

I have nothing more to add to this. I don’t use curves anymore for some time because I don’t see the need. With a few main modules designed for scene reffered workflow I can work much more precisely than I was able to with curves before.

What appeals to me about this is the logic of how the modules are designed, which reminds me a lot of the functionality of a stereo system:

Metaforically, there are two “decks” for both brightness and color individually:

For brightness: the exposure module for global manipulation (amplifier) and Tone Equalizer for local manipulation (equalizer/filter).

For colors: color calibration module for global manipulation of three basic channels (amplifier) and color balance RGB for local and fine adjustments (equalizer/filter).

And at the end you have an extra deck: filmic or sigmoid as a kind of compressor or limiter that makes sure that certain values are not exceeded.

8 Likes

Thanks for the metaphors, it has helped my understanding.

1 Like

Are the two actually seeing the same data at input?? If not this could also impact what result the module will produce. Also in the old levels module it was possible to specify some of the values esp say the grey. I had ones with 45 50 and55 percent for grey… so I would use it as needed to offer a brighter or darker result. You could also set the limits say to 0.1 and 99.9 and get a stronger result … This mode is not available in the RGB version…

I am very pleased with the constructive replies here. It would not really be useful to supply a sample. When I find that an image after the white balance and or color calibration module still has a color tint an easy way to resolve this is curves using individual channels. For instance a slight lowing of the blue curve will add yellow. I appreciate I could do this in other modules, but the ease of doing it with curves is attractive to me (I can also do this in rgb levels as well). Probably because of years of doing corrections this way in other programs is why I like this method so much.

@s7habo thanks for the link to your video. I will watch it later today.

My challenge now after all these replies is to find the best way to handle scans of faded images in Darktable. With GIMP, auto levels often performed magic on these sorts of images. At worst, I can continue using GIMP for these images and that is no big deal since like Darktable it is free. At least now I understand that Darktable incorporates most of what I like about GIMP’s curves, but has spread the features across a number of modules.

Why don’t you post a scan as a play-raw? Or maybe search first?

https://discuss.pixls.us/search?expanded=true&q=%23processing%3Aplayraw%20scanned

Use multiply/reverse multiply if you mask or even subtract blend modes with something like local contrast, exposure or even curves… I had a preset that I used like dehaze…it was the tone curve module with no mods blended in subtract at around 10% opacity…usually never higher than 20 and sometimes with a small curve tweak… these can really help with faded scans skies etc…

Try the channel mixer (R, G, B tabs in Color Calibration). That’s essentially what it does. Boris has some good videos on how to do it.