This page Copyright (c) C F Systems, 2003

Preventing Banding and Stair-Step in Photoshop Images

Banding and blocky patches in areas of even color are almost always entirely due to the way numerical calculations are done in Photoshop (and other image editing programs). If you work directly on an 8 Bits/Channel mode image to make other than minor corrections, these effects will appear. The mode is shown in Photoshop under Image→Mode: with 8 Bits/Channel checked. If you are using 16 Bits/Channel mode you will already know it. But, you may say, that shows I work with 8 Bits/Channel images all the time in Photoshop and only rarely see banding effects.

That is because Photoshop has a "solution" to this problem: "dithering." When Photoshop applies dithering to an image, they randomize the least significant bit of each color in each pixel. In non-mathematical terms that means they add a slight bit of fuzz to each pixel, so that any two adjacent pixels that formerly were the same color are now slightly different colors. This fuzziness breaks up the evenly colored areas that cause banding. This often does eliminate the banding, but it has the same general effect to the photo as smearing a bit of grease on the lens might have. It fuzzes out the banding effect, but in doing so it also applies the same fuzz to all the detail in the rest of the image. This may be satisfactory when maintaining the highest image quality is not important, but not for critical work.

We recommend leaving dithering turned off. A side trip to Accuracy and Precision in Digital Photography: Dithering will teach you how, if you do not know, with a bit more comment about dithering. Photoshop applies dithering to more operations than the dialogs imply. It may apply dithering to an image more than once during editing and preparation, multiplying the haze effect each time. If you have an image which already has banding effects due to improper earlier treatment, you may wish to be sure dithering is on to see if it will help that image, but in general dithering is best left off.

In working with original images, banding and stair-step can be essentially eliminated by following a few rules while working in Photoshop. The first and most important of these is to do as much of the major image alteration and editing in 16-Bits/Channel mode as possible, starting with any necessary image resizing. Preliminary color correction and image density correction should be done in 16 Bits/Channel mode, leaving only minor tweaking to be done later in 8 Bits/Channel mode. If the image has light and dark areas that should be given substantially different corrections to preserve detail, select, feather, and mask the image to do at least an approximate correction in 16-bit mode. In particular, do all adjustments necessary to bring out highlight and shadow detail (usually localized applications of the Curves tool applied to RGB). Also adjust any areas that require substantially different color correction than the main image.

If intricate selections are required to do this, temporarily take the image into 8 Bits/Channel mode to create the selections and revert to 16 Bits/Channel mode to apply them. You may even find it useful to make the corrections in 8 Bits/Channel mode and Save the Levels and/or Curves corrections to be Loaded and re-applied when you revert to the 16-Bits/Channel image.

Saving Selections to use with 16 Bits/Channel

It is often easier to make complicated selections after you have converted an image to 8-Bits/Channel mode (Image→Mode, check 8-Bits/Channel). To save a selection for use with the 16-Bits/Channel image, after you have made the selection use the menu Select→Save Selection. A dialog box will appear, with the options shown at the left below. It will not work to save the selection in the current file, which appears on top, because such selections will disappear when you revert to 16 Bits/Channel mode. Use the top pulldown and select New to put the selection in a new file, right below. Then name the selection, as shown at the bottom below, and OK to exit out of the save selection dialog.



This will create another open image document in Photoshop, normally Untitled-n, where "n" is a number that depends on how may other image documents have been created previously. If you create more than one selection to be saved, all selections after the first will show the Untitled-n name in the Document pulldown as well as New. Normally you will want to save in Untitled-n and keep all your selections in one file. The Untitled-n image file can either be left open or saved as a Photoshop file. In either case this file will have to be open in Photoshop when you want to reload the selection. Now revert or reload to restore the image as 16 Bits/Channel. To restore the selection, Select→Load Selection. A dialog will appear with the following pulldowns:



The Document pulldown lists the Untitled-n file. In this case, we had saved the file to disk as Untitled-2.psd. Since it is not possible to save a selection in a 16 Bits/Channel files, only the Untitled-n file will be available on the pulldown (assuming no other image files are open). The Channel pulldown will list any selections that have been saved in that file.

Note that for this to work, the image cannot be resized or cropped between saving and loading the selection.

We also recommend that any image alterations, such as might be done with the clone brush, be done while still in 16-Bits/Channel mode. Filters are a bit more problematical, because so few are implemented for 16-Bits/Channel mode and because layers, so often necessary in best applying filters, are not available in 16-Bits/Channel mode.

Currently film scans and images from higher end digital cameras can be delivered to the PC as 16 bit images, but what should be done with images that are delivered as 8 bit, such as from even many expensive digital cameras? Convert the images to 16-Bits/Channel before doing any major editing or alteration. After converting to 16 Bits/Channel, perform any image interpolation to create a higher pixel count (resizing). In fact, such a resizing can be very beneficial to the final image quality as the interpolation will make use of the newly added bits of precision and later image adjustments will have a more uniform effect on the overall image. You may read elsewhere that converting to original 8 Bits/Channel image to 16 Bits/Channel cannot possibly help. Anyone saying that simply does not have a good understanding of numerics. It may be possible not to get a benefit, but it is hard not to, particularly if you do any image resizing or apply nearly any filter. Understand that the benefit is measured against what you would get if you used 8 Bits/Channel mode; it is not a matter making great gains, but of eliminating the often serious losses.

In any case, convert to 8-Bits/Channel mode only after there is nothing more that can be done in 16-Bits/Channel. Perform all additional adjustments in 8-Bits/Channel mode, using Adjustment Layers rather than applying corrections directly to the 8-Bits/Channel image, whenever possible. An important additional advantage of adjustment layers is that changes are non-destructive and can be rethought and tweaked at any time without suffering cumulative losses in image quality.

If Photoshop had implemented Adjustment Layers in a numerically sensible way, that would be all that is required. Of course, Photoshop did not, so we have one more step to best insure a high quality result. (For the curious, Photoshop goes through the layers sequentially, producing an 8-Bits/Channel intermediate result for each successive layer. The numerically sensible method would be to perform the complete calculation for all layers using 16 bit arithmetic, reducing only the final result to 8-Bits/Channel. It might even be quicker that way.)

So, as a final step to compensate for the less than desirable layers implementation, make some of the layers overdo the intended correction. Then, to those layers apply an opacity correction which will dilute the layer correction to the desired amount. Try to arrange so that the opacity is in the range of 25% to 75%.



This forces Photoshop to produce a weighted average, which is numerically more likely to produce a uniform result. In practice this final step often may not be required, depending upon the nature and extent of the layer corrections. So, if varying layer opacity is not something you would routinely do anyway, it could be applied only when problems arise.

We devised and have been using very nearly this same approach very soon after we first started using Photoshop and we have had no problem with banding or blocky areas since.

As these methods are original with us, you are welcome to use them in an article, a course, or a book but please credit C F Systems and www.c-f-systems.com

Privacy Policy and E-Mail
Go to C F Systems Home Page