Blending Modes part 3: Color shifts and Difference blending mode


Posting rules: It shouldn't need saying, but... play nice. Please keep your discussions civil. You can disagree, just don't be disagreeable. And, of course, all of the usual stuff like no spamming. Tex adds: I'll be rigorously enforcing this as we go along. We're probably going to be a small community in a little lifeboat, so we can't have members at each others' throats. This is for the sake of the project as a whole. So when you post, pretend you're speaking in person with your very wealthy auntie who has always treated you wonderfully and currently lists you prominently in her will. I won't be tossing anyone out of the forums because we are all in this together (except spammers: immediate membership cancelation), but I'll delete suspect posts right away.


1 post / 0 new
Doug
Blending Modes part 3: Color shifts and Difference blending mode

As I've been writing up these postings on blending modes, I've become more acutely aware of LightZone's limitations with color fidelity. I primarily use LightZone for B&W work, so it's not usually on my own mind. But when I start talking about processing color images, I feel like I need to point out the problems.

Okay, most photo editors have exactly the same problem. Like LightZone, they process the red, green, and blue channels separately, and this can cause a color shift if the processing in question isn't a simple gamma function with respect to the original pixel levels. In practice, the color shifts aren't noticeable or at least aren't objectionable except in rare cases.

But the top-tier editors provide ways around this. For the power users, the L*a*b* color space is the ultimate. But for most users, the simpler approach is that those editors provide a "Luminosity" blending mode which specifically retains the color information of each pixel while changing only its brightness. LightZone doesn't provide Luminosity as an available blending mode, but the ZoneMapper tool defaults to using a luminosity computation. So LZ does have one tool that can be used without any risk of messing up the colors.

Given our 20/20 hindsight, Light Crafts' decision to use a 16-bit linear working color space wasn't nearly as useful as choosing to use a 16-bit L*a*b* working color space would have been. The "linear color space" simply doesn't offer any significant value, while an L*a*b* color space would have not only eliminated unwanted color shifts, it would have made image processing somewhat faster because most tools would only need to operate on the L channel.

A short digression about linear color spaces... Around 15 years back, a Finnish gentleman named Timo Autiokari put together a comprehensive and very nicely-presented web site extolling the virtues of processing images using linear data rather than gamma-corrected data. He built quite a following, even though every color expert who addressed the issue said that he was wrong. Today, Timo's web site is gone — taken down in September 2008 — and no significant photo editor other than LightZone has adopted a linear (gamma=1) color space for editing. In fact, Adobe Lightroom went the opposite direction — Lightroom's editing color space is nominally ProPhoto RGB, but Adobe chose to increase the gamma from the ProPhoto RGB standard 1.8 up to 2.2 [technically, the sRGB gamma curve] for editing in Lightroom. I think it's safe to say that editing in a linear color space is no longer considered a Good Thing.

We'll be seeing a lot more color shift problems when we get into the Darkening blending modes. We'll also be seeing "collateral damage" from the decision to use a linear working color space instead of the gamma-adjusted working spaces that virtually all other editing tools use.

Difference

This blending mode displays the difference between the output of the tool and the original image. The difference is an absolute value, so you can't tell which direction the difference lies, but at least you can see where the differences are and how strong they are.

Light Crafts says: "Subtracts either the blend color from the base color or the base color from the blend color depending on whichever is brighter."

There's not much to be learned from this particular chart. The magenta (no change) line is straight across at the 0 point (black), well off the bottom of the chart. The yellow "+1 Ev" line follows the input reference because +1 Ev is two times the input, and 2x-x is x. Until it hits the maximum, at which point the input value quickly catches up and the difference crashes toward zero. The cyan "-1 Ev" line simply runs 1 Ev below the reference, because -1 Ev is half the input, and x - x/2 = x/2.

The Difference blending mode is useful for seeing what areas of an image are being affected by a tool. When you're doing sharpening, whether with the Hi Pass Filter or the Unsharp Mask, switch to Difference blending mode and you can see the edges and the noise that are being sharpened. Adjust the controls — Radius and (for USM) Threshold — to drop out the noise while keeping the important edges visible, then switch back to Normal mode.

Similarly, when you're using a Noise Reduction tool, switching to Difference blending mode will let you see the noise and the detail that it's reducing. Adjust the controls to clean up the noise while keeping the important details visible, then switch back to Normal mode.

For almost any tool, switching to Difference blending mode will let you see if there are any significant color shifts. If you don't see any colored areas, things are great. If you do see colored areas, the color tells you what is being either strengthened or weakened — you can't tell which from this view — in each area. Make notes, or just remember the areas and the colors, and switch back to Normal blending mode. Now switch the tool on and off and look to see if the color shifts are anything you want to worry about. Again, it's possible to adjust the controls while the tool is in Difference blending mode to try to reduce or eliminate the color shifts. When fighting color shifts, remember that you can select areas for the tool to ignore.

The Difference blending mode is one of my favorite tricks. I can't think of any way that it would be useful as a part of a real-world tool stack, but I find it to be immensely useful as a temporary choice to see what the effects of a particular tool are, and where those effects are.