I noticed that the GIMP layer mode "subtract" only subtracts part of the value in the MASK layer. Subtracting 10 from 16 results in 7. Subtracting 10 from 32 yields 28. Subtracting 10 from 64 yields 62, etc. So the higher the value in the IMAGE layer, the less is subtracted. Not only is GIMP not really subtracting absolute values, it seems to subtract inverse proportional values. Am I doing something wrong here? I use GIMP version 2.10.18.

  • Hi. Welcome to GDSE. What is the actual problem you are trying to solve by using the Subtract blending mode? Is this graphic design related or for something else? The reason I am asking is because as your question is currently written, it looks like an XY Problem. – Billy Kerr Apr 22 '20 at 19:54
  • Also please note that there are 2 subtract modes in GIMP 2.10. There's the newer Subtract mode in the default layer modes, and the older Subtract (II) in the legacy layer modes. Which one are you using, and have you tried the other? If you are looking for an effect more similar to Photoshop's subtract mode or older GIMP versions, then use the legacy Subtract (II) mode. – Billy Kerr Apr 22 '20 at 20:06

This is because values 0..255 are gamma-corrected. Under the hood Gimp converts them to linear values, does the subtraction, and gamma-corrects them again.

In this image, the top layer is a linear black to white gradient, with RGB(127,127,127) in the middle of the image. This top laye is in Subtract mode This works as you describe, the result of the subtraction is not RGB(128,128,128).

enter image description here

You can ask Gimp to work directly on the values without gamma-correction by switching to "legacy" blend modes (small selector at the end of the mode selector). In legacy mode (Wilber's head) you get what you expect:

enter image description here

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.