0

I have an image that I like, however, the blacks are a bit to dark. I tried using the Gimp tool "Colors->Curves" where I can set the maximum value that gets brightened, however, this not only increases the brightness of colors where all channels are dark but also the dark channels of colors that have one channel that isn't dark.

What I want is a tool that increases brightness for all colors for which the sum of all channels is below a specific value. How can I do that (preferably Gimp, but I would also be happy for any tool that works on Windows or Linux that doesn't cost money)?

For example I have this image:

What I want is something link this:

But when I use curves in Gimp to try to increase the brightness of dark colors I get this:

enter image description here

(The actual image is more complex so manually editing the colors is not feasible)

6
  • 2
    Hi. Welcome to GDSE. Any chance you could share the image, or one similar, and perhaps show what you have already tried, or what you are trying to achieve? It's hard to answer questions like this without images. Thanks. – Billy Kerr Feb 14 at 16:55
  • 2
    Make a lumniosity mask – joojaa Feb 14 at 18:39
  • @joojaa That looks like something that might help, thanks. – Darius Duesentrieb Feb 14 at 22:16
  • 1
    @DariusDuesentrieb - no images then? – Billy Kerr Feb 14 at 23:11
  • 1
    If this were for a photograph rather than something with solid black/blue in it, then I would use a tone mapping filter. GIMP has a few built in, and also the G'MIC plugin has several tone mapping filters. With these it's possible to lift the shadow areas in a photograph without adversely affecting midtones and highlights. – Billy Kerr Feb 15 at 22:22
1

What you want is a "Luminosity mask". It is a selection mask where the selection level is related to the pixel luminosity.

For you needs:

  1. Make a copy of your layer
  2. Colors>Desaturate and make a Monochrome version
  3. Colors>Invert so that the dark parts are white
  4. You can add a bit of contrast if needed or use Curves to blacken everything above some level. Do not threshold, the whole point of these masks is to have a very smooth transition between editable parts and "locked" so edited images remain very natural.
  5. Open the channels list, right click any of the R/G/B channels and Channel to selection. You can also drag that channel to the channels list below to make a copy for later use
  6. Back to the layers list, remove the B&W layer, and activate the initial layer

A nice tutorial

A script that makes it easy

Word of caution: the "dark" values are a relatively small range. If you boost them, you increase the range but you don't increase the number of possible values, so you have value "jumps" between adjacent pixels and this creates banding. A luminosity mask mitigates this a bit but not completely. You may need to use a better precision (see Image>Precision) and after conversion add a little bit of noise (HSV noise, add just enough Value noise to see the difference, then back out a bit). This should smooth the histogram:

After conversion:

enter image description here

After adding Value noise:

enter image description here

2
  • "The specified thread does not exist." for the second link, is the URL correct? – Darius Duesentrieb Feb 15 at 13:21
  • Sorry. Fixed now. – xenoid Feb 15 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.