In a grayscale image, how can I lighten all pixels that are darker than 50% gray to 50% gray without changing any of the other pixels?

For example, this image:

black to white

should become this image:

50% gray to white

I have tried using both the levels tool and the histogram. In the levels tool, I only managed to shift all pixel values, including those that are lighter than 50% gray:

levels tool

In the historgram, I'm unable to draw an edge and the curve always curves around the midpoint:


Is there an easier solution?

  • Sure you can do this in a hex editor very quickly. – joojaa Feb 6 at 9:23

Use Levels rather than curves to eliminate the splining curves generates.
Set input & output levels to 127 - 255 instead of 0 - 255.

enter image description here


enter image description here


A layer in Lighten blending mode, filled with 50% gray. Lighten layer takes a look at the color below and blend color, and it keeps whichever one of the two is the lightest.

enter image description here

Your Answer

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