: Why does painting with 1% opacity not always do something? I tried this with Adobe Photoshop Elements 9. When I have a black background, and a white brush with an opacity of 1%, the color
I tried this with Adobe Photoshop Elements 9. When I have a black background, and a white brush with an opacity of 1%, the color should get brighter if I click onto the same spot over and over again. It does that, but only until the color is #d5d5d5 . No matter how often I click onto an area with that color (or a brighter one), it won't get any brighter. Is this just a rounding error or is it intended?
Limits:
Adobe Photoshop Elements 9 or Photoshop CS2: #d5d5d5
javascript with processing.js (rounded to ~ 1.17%): #d4d4d4
GIMP 2.6.11: #c0c0c0
More posts by @Annie732
2 Comments
Sorted by latest first Latest Oldest Best
The ceiling is indeed a rounding issue -- it's a limitation of storing pixel values as 8-bit integers.
In Photoshop CS2, using decimal values rather than hex and looking at one channel for simplicity:
The value of the pixel appears to be given by:
NewValue = RoundToInteger(
(CurrentValue * (1 - InkOpacity)) + (InkValue * InkOpacity)
)
When InkOpacity = 1%, InkValue = 255,
NewValue = RoundToInteger(
(CurrentValue * 0.99) + 2.55
)
For CurrentValue < 44, this gives you an increment of 3 per click
For CurrentValue >= 45 and < 129 this gives you an increment of 2 per click
For CurrentValue >= 129 and < 213 this gives you an increment of 1 per click
For CurrentValue >= 213, there is no increment at all.
Note that with higher bit depths, InkValue would be greater. The effect of each click still diminishes, but the ceiling would be closer to pure white.
Assuming the same formula (I haven't tested in Photoshop yet), 16 bit channel values (for which InkValue = 65535) should eventually get you to 65486/65535 which is greater than 99.9% pure white. It'll take you 703 clicks though!
It's intended and more of a math concept than anything else. Think about when you multiply 1% x 1% x 1% etc., you will always get a number that is infinitely smaller. The same concept can be applied to colors / opacity. Meaning there will be a limit, which, in "color" or "hex", is your #d5d5d5
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.