Gimp-Forum.net

Full Version: "Darken only" disaster
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
"Darken only" seems pretty straightforward, but I have been managing to get the same surreal result every time I do it. 

I’m using a solid-colored second layer to try to bring color into an original image. Instead of this color just appearing in the lighter areas, the ENTIRE IMAGE becomes tinted with that color, and that happens every time, with every image, and no matter what color I use. Here is an an example:

[Image: Screen%20Shot%202018-08-17%20at%201.35.1...tznyou.png]

(No, the pattern hasn’t changed, I just took little samples from a big image and didn’t line them up perfectly.)

I’m not doing anything fancy here; I wouldn’t know how. All I’m doing is creating a new layer, adding the color to it, and using the "Darken only" control. Can someone please tell me what I’m doing wrong? This is making me crazy, LOL!
Quote:.."Darken only" seems pretty straightforward, but I have been managing to get the same surreal result every time I do it.

Usually means you are using the wrong tool Wink

What exactly effect are you looking for? Selectively colour just some of the shapes, or...what?
That's probably true, LOL! To the person with a hammer, every problem looks like a nail, right? What I'm trying to end up with is an image where most of those little bits are sort of a Crayola green, with the sprinkling of lightest bits yellow, the sprinkling of darkest bits blue, and also a sprinkling of red pieces. Getting most of it green is simple enough, and I was hoping to use lighten and darken only to do the yellow and blue for me, and then all I would have to do would be the red by hand. I'm hoping there's a better way!
I do not know about 'better way' Got me beat.

A couple of ways.

Colors -> Map -> Palette Map But first make a palette with your colours. Import from a temporary image. The docs here: https://docs.gimp.org/en/gimp-palette-dialog.html  
But then it will need editing, from darkest = red to lightest = yellow

Applied looks like this before and after: https://i.imgur.com/CmGwk0f.jpg

Another way
Convert the image to indexed mode, with a small number of colors. Image -> Mode -> Indexed
Open the colormap dialogue Windows -> Dockable Dialogues -> Colormap and edit the colour map replacing the various grays with colours.  Another before and after. https://i.imgur.com/YYR1vzo.jpg
Then Image -> Mode and back to RGB

edit: Then thinking about your images, you probably want the gray shading incorporated, the original grayscale over the coloured in image in one of the layer modes should work.

another example, used palette map and overlay in color(LCH) mode - Just realised you are using a Mac and probably Gimp 2.8 That mode is available in Gimp 2.10

[attachment=2031]
Works as designed:

Quote:Darken only mode compares each component of each pixel in the upper layer with the corresponding one in the lower layer and uses the smaller value in the resulting image. Completely white layers have no effect on the final image and completely black layers result in a black image.

In other words, "Darken only" is done by channel, not comparing the general value of the pixel.

To do what you want:

- Put the pattern layer on top
- Layer > Mask > Add layer mask and initialize to "Grayscale copy of layer"
- Threshold the mask (possibly after inverting it)

But then you have to get rid of the compression artifacts in your pattern, because the gray areas are far from uniform.
Thanks for giving me all those methods, you guys! I went with the "mask method," which looked easiest, and by both inverting and not inverting, got both lighter and darker colors added to the image!  Big Grin