Sub topic 7
Apply Image settings for 8-bit and 16-bit documents
This chapter explains how to fill the High layer so that it recombines with the Low layer into the original image. I assume you already have a Low layer (a Gaussian Blur copy of the photo) and a High layer (an unblurred copy above it). I also assume you know how to check a document's mode under Image > Mode. This chapter covers 8-bit and 16-bit RGB files only.
Why the settings depend on bit depth
The High layer holds the difference between the original and the blurred Low layer. A difference can be negative, but a pixel cannot. To store it, Photoshop shifts the result so that "no difference" becomes mid-gray. Then the Linear Light blend mode subtracts that mid-gray shift when the layers are stacked. The High layer therefore looks mostly flat gray, with fine texture visible as light and dark detail.
The two bit depths reach the same mid-gray in different ways:
- An 8-bit file stores 256 levels per channel. Mid-gray is 128, so the Offset field adds it directly.
- A 16-bit file stores far more levels per channel. The Offset field does not map cleanly onto the 16-bit mid-gray in the Subtract setup. The usual workaround is Add with Invert on and Offset 0. Inverting the source and averaging produces the same mid-gray shift without using Offset.
The 8-bit recipe
Select the High layer, then choose Image > Apply Image and enter these values.
Image > Apply Image (High layer selected)
8-bit document:
Layer: Low
Channel: RGB
Blending: Subtract
Opacity: 100%
Scale: 2
Offset: 128
Invert: off
Then set the High layer blend mode to Linear Light.Photoshop computes (Target - Source) / Scale + Offset for Subtract. The target is the High layer and the source is Low. With Scale 2 and Offset 128, each pixel becomes (original - blurred) / 2 + 128.
The 16-bit recipe
Image > Apply Image (High layer selected)
16-bit document:
Layer: Low
Channel: RGB
Blending: Add
Opacity: 100%
Scale: 2
Offset: 0
Invert: on
Then set the High layer blend mode to Linear Light.Add computes (Target + Source) / Scale + Offset. With Invert on, the source is the negative of Low, which is 1 - blurred when values run from 0 to 1. The result is (original + 1 - blurred) / 2. That equals (original - blurred) / 2 + 0.5, the same formula as the 8-bit recipe, with 0.5 as mid-gray.
| Setting | 8-bit | 16-bit |
|---|---|---|
| Layer | Low | Low |
| Channel | RGB | RGB |
| Blending | Subtract | Add |
| Opacity | 100% | 100% |
| Scale | 2 | 2 |
| Offset | 128 | 0 |
| Invert | off | on |
| High layer blend mode | Linear Light | Linear Light |
Checking the math
You can confirm that both recipes agree and that Linear Light restores the original. Linear Light computes base + 2 * (blend - mid-gray). The script below runs one pixel through each pipeline, using 0 to 1 values for 16-bit and 0 to 255 for 8-bit.
def eight_bit(original, blurred):
high = (original - blurred) / 2 + 128
high = max(0, min(255, round(high)))
restored = blurred + 2 * (high - 128)
return high, max(0, min(255, restored))
def sixteen_bit(original, blurred):
inverted = 1.0 - blurred
high = (original + inverted) / 2
restored = blurred + 2 * (high - 0.5)
return high, restored
print(eight_bit(180, 150))
print(sixteen_bit(180 / 255, 150 / 255))The 8-bit call returns a High value of 143 and a restored value of 180. The 16-bit call returns a High value of about 0.559 and a restored value of 180/255 (about 0.706), so both restore the original. Large differences can clip in 8-bit. For example, a pixel 300 levels away from its blur cannot exist, but a difference over 255 in either direction would also exceed what Scale 2 can hold. Fine skin texture stays well within range, so this matters mainly for very hard edges.
Doing it in order
The order of steps matters, because Apply Image reads the Low layer as it exists at that moment.
- Duplicate the background twice and name the copies Low (lower) and High (upper).
- Select Low and apply Filter > Blur > Gaussian Blur with your chosen radius.
- Select the High layer. Apply Image can read Low even when Low is hidden, but you should keep Low visible so you can see what you are doing.
- Open Image > Apply Image and enter the values for your document's bit depth.
- Set the High layer's blend mode to Linear Light.
Common errors
- The High layer looks like a blurry or inverted ghost. You probably used 8-bit settings in a 16-bit file, or the reverse. Undo, check Image > Mode, and reapply.
- The image changes when you toggle High. The separation is not exact. See the next chapter for a full verification method. A typical cause is the wrong source layer in the dialog.
- The target is wrong. Apply Image writes into the selected layer. If Low was selected when you ran it, you have overwritten the blur. Undo immediately.
- The result is still slightly off after changing the radius. Gaussian Blur on Low was changed after High was built. High is a fixed record of the old blur, so the pair no longer match. Rebuild High with Apply Image after any blur change.
- Scale is not 2. Linear Light doubles the blend-layer deviation from mid-gray, so Scale 2 is required to cancel it. Any other value breaks the round trip.
Quick check on a real file
To test your setup, hide every layer except the High layer and look at it. You should see mostly neutral gray with pore and hair detail. Then show Low and High together with Linear Light. The result should match the hidden original. The next chapter shows a more rigorous way to compare them using a Difference layer.
Exercise
You are working in a 16-bit document and the High layer, after Apply Image with Subtract, Scale 2 and Offset 128, looks wrong. What settings should you use instead, and why do they give a mid-gray result without relying on Offset?
Show answer
Use Blending: Add, Scale 2, Offset 0, Invert on, with Layer set to Low and Channel RGB, then set the High layer to Linear Light. Inverting the source gives 1 minus the blurred value, so Add and Scale 2 yield (original - blurred) / 2 + 0.5. The 0.5 mid-gray comes from the inversion and averaging, so Offset is not needed.
Exercise
Why must Scale be 2, and what does Linear Light do to the High layer's values when you stack it on Low?
Show answer
Linear Light adds twice the High layer's deviation from mid-gray to the layer below it. Apply Image stores only half the difference (Scale 2), so doubling it on recombination restores the full difference and the original image.