• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
3

P: Apply Image, Soft Light, and the 6-years old "50% Gray in 16-bit mode" issue

Community Beginner ,
Oct 28, 2018 Oct 28, 2018

Copy link to clipboard

Copied

This is a bug possibly connected to an unfixed 6-years old bug regarding the value for 50% gray in 16-bit mode in some Photoshop dialog boxes, see: https://feedback.photoshop.com/photoshop_family/topics/photoshop_uses_the_wrong_50_gray_as_the_neutr...

The problem:
Using Apply Image (Blending: Add, Opacity: 100%, Scale: 1, Offset: -128) on two 50% gray (RGB values of: 16384) layers in 16-bit mode produces non-50% gray layer.

Steps to reproduce (with correct 50% gray value of 16384):

  1. Create an empty document in 16-bit mode (of any size)
  2. Create an empty layer, named "A". Delete the background layer.
  3. Fill the layer "A" with 50% gray (Edit>Fill: Contents 50% Gray)
  4. Use the Info panel, read RGB values in 16-bit mode of the Info panel: 16384, in 8-bit mode: 128
  5. Duplicate the layer "A", name it "B". Make sure the layer "B" is an active layer.
  6. Image>Apply Image: Layer: A, Blending: Add, Scale: 1, Offset: -128
  7. Read the resulting value: 16320 (in 16-bit mode of the Info panel), 127 (in 8-bit mode of the Info panel)
    Expected: 16384 in 16-bit mode of the Info panel and 128 in 8-bit mode of the Info panel.


Steps to reproduce (with incorrect 50% gray value 16448)
:

  1. Create an empty document in 16-bit mode (of any size)
  2. Create an empty layer (alt-click the "new layer" icon), named "A" in the "Soft Light" mode, with checked "Fill with Soft-Light-neutral color (50% gray)". Change the mode to Normal. Delete the background layer.
  3. Use the Info panel, read RGB values in 16-bit mode of the Info panel: 16448 (different from the previous one), in 8-bit mode: 128 (the same as the previous one)
  4. Duplicate the layer "A", name it "B". Make sure the layer "B" is an active layer.
  5. Image>Apply Image: Layer: A, Blending: Add, Scale: 1, Offset: -128
  6. Read the resulting values didn't change: 16448 (in 16-bit mode of the Info panel), 128 (in 8-bit mode of the Info panel)

Possible cause:
Apply Images uses an incorrect way for converting -128 (8-bit) to a 16-bit value.
Is: convert_8bit_to_16_bit(128) -> 16448,
Should be: convert_8bit_to_16_bit(128) -> 16384.

Workaround (with some losses):
We want to calculate: for layers A and B create the layer C with pixel values of:
"50% gray" + ((A - "50% gray") + (B - "50% gray")) (clipped at 100% black and white)

1) For layers A and B, shift the correct 50% gray point (16384) to the incorrect one (16448) using the Levels adjustment (NOT the Adjustment layer!) with "input white = 254". We are loosing some data.
RackMultipart20181028214096742-40be9124-73af-4e73-9519-3fbc8920d7a6-852546474.pngRackMultipart20181028214096742-40be9124-73af-4e73-9519-3fbc8920d7a6-852546474.png

2) Use the Apply Image as above.

3) Convert the result to the correct 50% gray point (16384) using the Levels Adjustment Layer, with "output white = 254".
RackMultipart201810281175713xq-0f513546-e53e-4bc2-9ab1-ee968eaa7ce6-1299189073.pngRackMultipart201810281175713xq-0f513546-e53e-4bc2-9ab1-ee968eaa7ce6-1299189073.png
We fall one short of all values near 50% gray (for example we get 16383 instead of 16384 for 50% gray), so we have to add "+1" to all pixel values in 16-bit mode. Tricky. Create a Fill Layer, Mode: Linear Dodge (Add), Opacity: 1%, Fill: 50%, Color #010101.
RackMultipart20181028876pdcqja-1c80c5af-7f10-4c1b-be06-bc0f54dbe7ce-5028913.pngRackMultipart20181028876pdcqja-1c80c5af-7f10-4c1b-be06-bc0f54dbe7ce-5028913.png
Select layer A, Merge (Ctrl+E). Delete layer B.

Bug Unresolved
TOPICS
macOS , Windows

Views

150

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Feb 12, 2019 Feb 12, 2019
This should now be fixed in the Photoshop 20.0.3 release.
Feel free to update Photoshop and let us know if this is resolved for you.

To update Photoshop CC to 20.0.3, click "Update" in the Creative Cloud desktop app next to Photoshop CC.
More detailed instructions for updating

Thank you for the report Damian!
Regards,
Pete

Votes

Translate

Translate
4 Comments
Adobe Employee ,
Nov 15, 2018 Nov 15, 2018

Copy link to clipboard

Copied

Hi Damian, have you tried the 20.0.1 update? Please let me know if that fixes your issue. Thanks!

Votes

Translate

Translate

Report

Report
Community Beginner ,
Nov 18, 2018 Nov 18, 2018

Copy link to clipboard

Copied

Hi Jeffrey. No, it is not fixed in the 20.0.1.

Chris Cox himself stated that the correct middle value for 16-bit (as implemented in Photoshop as "15-bit + 1") is 16384 (here: https://forums.adobe.com/message/7569532#7569532).

Adobe engineers (or anyone else) should be able to use the steps I provided in the section "Steps to reproduce" to check if the problem is fixed.

I cannot edit the original post, but I should add (after point 1.) : "zoom to 100%".

In low zoom levels the readout in the Info panel is incorrect for 16-bit mode. This is caused by another several years old bug: https://feedback.photoshop.com/photoshop_family/topics/incorrect-rendering-of-color-and-banding-when...

Votes

Translate

Translate

Report

Report
Adobe Employee ,
Feb 12, 2019 Feb 12, 2019

Copy link to clipboard

Copied

This should now be fixed in the Photoshop 20.0.3 release.
Feel free to update Photoshop and let us know if this is resolved for you.

To update Photoshop CC to 20.0.3, click "Update" in the Creative Cloud desktop app next to Photoshop CC.
More detailed instructions for updating

Thank you for the report Damian!
Regards,
Pete

Votes

Translate

Translate

Report

Report
Community Beginner ,
Feb 13, 2019 Feb 13, 2019

Copy link to clipboard

Copied

LATEST
Hi Pete,

I'm afraid the problem is NOT fixed. In version 20.0.3 the problem is even worse than before 😞 Now there is no easy way(*) of getting idempotent apply image with aforementioned settings (that is: creating a gray value that would not be affected at all by applying the Apply Image). It seems that you have corrected the gray value in one place (the "New layer" dialog) but forgot to correct it in the "Apply image" function.

From your own manual ( https://helpx.adobe.com/photoshop/using/channel-calculations.html#add_and_subtract_blending_modes ), the "Add" mode in Apply Image should work as follows: "Add mode divides the sum of the pixel values by the Scale amount, and then adds the Offset value to the sum."

Using the 50% gray color = (128,128,128) = 0x808080, filling with that color and using the info panel to read out the 16-bit values, we get the gray value of 16384. So we should be able to assume that 128 (8-bit) == 16384 (16-bit).

For 2 layers containing "Photoshop-correct 16-bit 50% gray" (that is: 16384) the Apply Image settings {Blending: Add, Scale: 1, Offset: -128}, we should get (16384+16384)/1 - convert_to_16bit(128) = 2 * 16384 - 16384 = 16384.

But in the current version (20.0.3) of Photoshop we get an incorrect value: (16384+16384)/1 - convert_to_16bit(128)=16320. From that we can calculate convert_to_16bit(128) = (16384+16384)/1 - 16320 = 32768-16320 = 16448 (wrong value).

(*) To get a gray value that doesn't change after Apply Image, we have to produce the 16448-gray value. Fortunately the old trick still works: create the 16448-gray layer, create new fill layer with the color of #010101, fill 75%, opacity 66%, blend mode Linear Dodge (Add). Merge those two layers to get a 16448-gray layer.  Now proceed from the step 3 of the section "Steps to reproduce (with incorrect 50% gray value 16448)". You also can use the method from the section: Workaround (with some losses).

Votes

Translate

Translate

Report

Report