Pixel Editing

Judy Herrmann and Mike Starke

Pixel editing alters image appearance at the pixel level. Although it changes the original data, which makes pixel editing inherently destructive, it is sometimes the only way to achieve certain types of edits and to work in other color modes, such as CMYK.

Why use pixel editing software?

As described in the overview, PIEware has become so capable that pixel editing is now largely reserved for creation of master files requiring special treatment. We describe below how these master files become the basis for subsequent derivative and delivery files.

In an ideal world, all image edits would be performed non-destructively but there are some things that parametric image editing software (PIEware) can’t do as well or can’t do as easily or as accurately as can be done in pixel editing applications. Our recommendation is to use PIEware to get your image looking as close to your final vision as possible. Then use pixel editing software for any remaining needed adjustments or to do those things that can’t yet be done in PIEware, such as converting into the CMYK color space, combining multiple images (including panorama stitching and HDR compositing), and combining vector and raster graphics such as adding type and other effects.

Editing pixels is inherently destructive – it literally rewrites your data, and once the original data has been overwritten, you can never get it back. Any loss of color depth or sharpness and any added artifacts such as banding, noise, color blow-outs, etc. become a permanent part of the file the moment you hit Save. However, non-destructive image editing options exist within pixel editing applications as well. The best practices outlined here help preserve your options by extending non-destructive image editing as far into the pixel editing process as possible. This ensures future flexibility by preserving the original data for as long as possible and increases efficiency by minimizing any duplication of effort when repurposing files for different output devices, sizes and uses.

FIGURE 1AThis example illustrates the destructive nature of pixel editing. The original capture, shown in the Adobe RGB 1998 color space, contains colors that do not exist in the smaller CMYK color space.

FIGURE 1BWhen the image is converted to CMYK, the out-of-gamut colors are clipped or remapped, resulting in a loss of visible texture and detail.

FIGURE 1CConverting the CMYK file back to Adobe 98 does not re-introduce the lost detail or the breadth of the original captured color. Though the destructive nature of pixel editing frequently isn't this clearly visible, all pixel level edits compromise your data in some way.

A summary of best practices for pixel editing

If you’re already familiar with pixel editing techniques, simply follow these best practices. For additional detail on any of these recommendations, see the linked explanations.

Use PIEware to bring the image as close to your final vision as possible before exporting into a pixel editing application. This will give you the best data to start with.

Determine the best size and resolution for importing your data into the pixel editing software.

Decide whether you need to perform any edits in 16 bit or can get away with 8-bit editing.

Do as much image editing as possible in the largest appropriate working color space (usually Adobe 98 or ProPhoto).

If converting your file into a delivery color space (eg CMYK), preview the delivery color space profile while the file is still in your working RGB color space and adjust any out-of-gamut colors before performing the conversion.

Importing data

Use PIEware to bring the image as close to your final vision and take care of as many noise and chromatic aberration issues as possible before importing your image into a pixel editing application. This will give you the best data to start with. Be sure to give careful consideration to your options for capture sharpening. PIEware sharpening has steadily improved over time and provides adequate capture sharpening tools for most images. Depending on the application you use and final results you need, though, specialized sharpening plug-ins still offer a more sophisticated approach, even for capture sharpening, and should be used if the image requires special treatment.

Determine optimum input size and resolution

In general, you should bring files into pixel editing applications at the native capture size. If current and future uses are limited to very small sizes, you can consider importing an image at a smaller size but if adequate processing power and storage are available, the risk of having to recreate edits at a larger size down the road will likely outweigh any upsides to working with a smaller file now.

Although some PIEware allows you to upsize files, you have less control over the methods used and, in any case, the differences between upsampling in PIEware and upsampling in Photoshop are extremely subtle. Also, any artifacts introduced through the interpolation necessary to upsize images will become a permanent part of the file even if you subsequently downsize it. For these reasons, we recommend that you avoid upsampling files prematurely.

Determine optimum input bit depth

Working with higher bit depth files increases the file size (a 16-bit file is literally double the size of its 8-bit counterpart) so it takes longer to open, save or perform any complex edits, like running filters. In many cases, higher bit depth makes no visible difference. Use these factors to determine the best bit depth for your image:

The bit depth of the original capture device: If the image was captured with a bit depth of 10 or less, you don’t gain much by converting to 16 bit. If captured at 12 bits or higher, there may be advantages to working in 16 bit.

The amount of pixel manipulation needed: If you plan to use a lot of filters, perform significant color changes, push the contrast heavily or otherwise significantly alter the value of the pixels in key areas, working in 16 bit can reduce the chance of banding or unwanted artifacts. Most minor corrections can be performed in 8 bit with no problems.

The amount of low detail gradients in the image: Texture and detail hide banding and artifacts. In fact the “cure” for banding is adding noise. It does not take much pixel pushing for smooth, graduated areas (eg sky, seamless backgrounds, the edges of shadows, etc) to develop visible banding in 8 bit.

The editing color space: The wider the gamut of your working color space, the greater the need for high-bit depth. RGB color spaces define values self-referentially. In other words, 255 red, is the reddest red in the color space. A narrow-gamut space, such as sRGB, has relatively small jumps between the tonal values, while a wide gamut space, such as ProPhoto RGB, has relatively large jumps (255 red is farther away from 0 but that distance is still covered by just 256 tones). Adobe RGB works well for both 8-bit and 16-bit files, though, for the reasons outlined above, 16 bit will be safer for some files.

As an alternative to working with 16-bit files, consider using PIEware to process the raw data differently for different areas. Then build your image in 8 bit using layers and layer masks.

Best color spaces for pixel editing

To preserve and utilize as much of the color information captured as possible, use a working or editing space that encompasses a broad color gamut (usually Adobe RGB (1998) or ProPhoto RGB). Keep files in that color space through the completion of the master file. Your final intended output will be the key factor in this decision. If all of your work is destined for offset printing, Adobe RGB (1998) provides all the gamut you need. Not so for inkjet printing. The newest inkjets can print some colors that are outside even the Adobe RGB gamut. Since the master file concept is to make files ideal for repurposing, we have started to come down on the side of doing pixel editing in ProPhotoRGB for all outputs.

Perform as much color correction as possible in your working color space before converting your file to a delivery color space.

Use non-destructive editing tools whenever possible

Always use layers and layer masks to accomplish as much of the pixel editing as possible. Use adjustment layers to non-destructively apply any necessary tonal changes. Take advantage of Smart Objects and Smart Filters when appropriate.

Using layers

Using layers increases flexibility and efficiency by allowing you to preserve each step of the image editing process, go back to earlier versions, preview the effect of different editing approaches and use creative tools such as blend modes to achieve a wide variety of effects. When working with raster layers, keep in mind that any changes made to the data will affect that layer but not the layers above or below unless those layers are merged or flattened.

Using layer masks

Layer masks let you selectively reveal or hide an effect (or pixel value change) that’s been applied to a layer. Layer masks themselves are non-destructive and can be added, deleted, edited or re-edited. The pixel data contained within the layer remains unaffected until the mask is applied to the layer.

Using adjustment layers

Applying tonal adjustments such as hue/saturation, levels, curves, etc directly to a raster layer permanently changes the data in that layer the moment you hit Save. Adjustment layers let you apply these same tonal adjustments as a separate non-destructive layer with its own layer mask. Adjustment layers and their masks can be created, deleted, recreated and edited infinitely as they do not affect pixel data until applied through merging or flattening.

Using Smart Objects and Smart Filters

Smart Objects have somewhat limited usefulness as you can’t use any pixel-based editing tools like painting, dodging, burning or cloning until you rasterize the Smart Object, but they still have significant value. Smart Objects can be non-destructively resized, rotated, distorted or transformed. In conjunction with Smart Filters, Smart Objects allow you to preview the impact selected filters will have on your image non-destructively

FIGURE 2Use the tools described above to extend non-destructive editing as far into the process as possible. In this example, the base layer is a Smart Object referencing the original raw capture. It includes a Smart Filter with a mask that allows us to selectively apply the filter’s effect. A “retouching” raster layer lets us make pixel level edits, like rubber stamping, healing, etc on top of the Smart Object. Adjustment layers and their masks allow us to apply tonal and color corrections selectively and non-destructively. Any required text could be added and non-destructively resized, distorted or edited using the vector layer on top.

Best practices for non-destructive pixel editing

The big advantage of using Smart Object layers to house raw files is that you can place a raw file, resize or distort it non-destructively, use non-destructive adjustment layers with or without masks to fine-tune the image, use non-destructive Smart Filters with or without masks to preview filter effects, and then, after all that, if you discover that you’re not completely happy with how you originally processed the raw data, you can reprocess the reference file using PIEware and your Smart Object layer will automatically update with the new processing parameters.

Before rasterizing any Smart Objects, be sure to save a work-in-progress iteration of your file with the Smart Objects in place in case you need to go back to it later.

Organizational tools for pixel editing

For greater efficiency when repurposing files in the future, use layer names and groups to track what’s been done.

Naming layers

An intelligent layer naming scheme helps you track information about each layer. If bringing multiple captures into a single file, embed the original capture name into each layer so you can get back to the original if needed. Identify any layers with edits applied directly to the pixel data (eg filters, transforms, etc.). Embed settings for any filters run on each layer into the name as well.

FIGURE 3Naming layers takes seconds and will save you hours of head-scratching if you ever need to go back to rework a file. This project involved compositing multiple captures and running several filters. The layer names reference the source captures and filter presets used.

Using groups

Groups let you nest a selection of layers into a single folder, keeping your layer palette more manageable and allowing you to reveal or hide multiple layers with a single click.

Groups should flow logically from need:

Group layers that together affect a given area, particularly if you want the ability to preview the image with and without that effect turned on.

If producing multiple variations on a single image, place each set of layers that forms a new variation into a separate group.

If you’ve merged layers in order to apply an effect to the merged pixel data, duplicate the layers before merging and store them in a group for future reference.

Always use the group name to indicate what it contains.

Compositing images

Compositing images includes activities such as blending multiple captures from a single photo session (eg the head from one capture with the body from another), panorama stitching, HDR and blending disparate images for artistic or conceptual effect. At this point in time, compositing images can only be done in pixel editing applications.

Compositing images will almost always require extensive use of layers and layer masks. Depending on your goals, layers may have to be resized, transformed, moved or otherwise altered to blend seamlessly into a cohesive image. As previously noted, using Smart Objects allows you to perform these actions non-destructively. If you have to resize or transform any raster layers, be sure to save a copy of the original in case you need to go back to it.

Working with variations of the same image can get very confusing very quickly, so all of the best practices listed in this section, particularly using organizational tools like layer names, groups and group names become even more important.

Preserving layers

Merging and flattening layers converts everything into a raster layer and permanently applies any data changes. Use the key command Shift+Ctrl+Alt+E (Win) / Shift+Command+Option+E (Mac) to duplicate selected layers before merging them together so you retain copies of the original, unmerged layers. Store the copies as an appropriately named group. Before flattening, save a work-in-progress file with all layers intact.

FIGURE 4Use Groups to house layers that have been merged or separate variations of a single image. In this example, the composited layers from Figure 3 have been stored in a group prior to merging them. We then duplicated the merged layer to perform final retouching and added several groups containing variations on a police light effect requested by the client.

Save work-in-progress files as needed

Ideally, all of your image edits and layers can be preserved within a single work-in-progress file but sometimes that’s neither possible nor efficient. Certain activities may require you to flatten the image to go to the next step. Smart Objects and vector layers may have to be rasterized, particularly if you need to do any pixel level activities like retouching. Sometimes, the sheer number of layers can make the size of the file too cumbersome to work with efficiently.

In such cases, saving key iterations of your image edits as work-in-progress files preserves flexibility by allowing you to access previous versions as needed. Follow best practices for file naming. Identify the order the files were created and whether or not any creative or output sharpening was applied. Distinguish between work-in-progress files that follow a single creative direction and those representing distinct variations in visual intent.

Save a work-in-progress iteration before committing to any irreversible actions such as:

Flattening your file for any reason

Merging layers without preserving the original layers

Rasterizing Smart Objects, Smart Filters or vector layers

As you optimize the color and tonality of your master file prior to converting it into the final delivery color space, be sure to save those layers and use the file name to clarify that these working files derive from your master file. See Preserve data when converting between color spaces below for more details.

Working with master files

Always save a master file and derive all delivery files from it. Master files provide a copy of the final interpretation of the data in a wide gamut working color space with no output sharpening applied. In general, master files (and all steps leading up to their creation) should be produced at native capture size.

Master files should serve as the basis for all delivery files. Preparing files for delivery may involve resizing, applying output sharpening, additional color correction prior to conversion into a smaller delivery color space such as sRGB or CMYK, and/or converting the file into the appropriate delivery color space.

Converting between color spaces

Delivery color space conversions may require some additional color or tonal corrections, which should be performed in the working color space using adjustment layers whenever possible, as shown in Figure 5. Be sure to save the resulting layered document as a derivative work-in-progress file prior to converting into the delivery color space.

FIGURE 5With the file still in the working color space (Adobe RGB 1998), we’ve loaded the custom CMYK profile provided by the printer into the Preview dialog box (View > Proof Setup > Custom) to see the impact converting to the smaller color space will have. Adjustment layers added while the file is still in RGB allow us to control out-of-gamut colors and preserve as much color and detail as possible during the conversion process. These layers will be saved in a separate work-in-progress file for future reference.

File delivery

We highly recommend delivering optimized files for client use. In a nutshell, you should follow these steps prior to delivering any files:

Resize the file to the appropriate dimensions and resolution for the intended use.

Convert the file into the appropriate delivery color space.

Embed all appropriate metadata including the file name, your contact information and a copyright notice.

Perform output sharpening on a separate layer after the file has been resized for final use – different sized files derived from the same master file should always receive individualized output sharpening.

Save the file in the appropriate delivery file format.

Preserve a copy of all layered work-in-progress files for future reference as well as the delivered files (in case the delivered copy gets lost, corrupted or altered) in your archives.

Tip:If you are having problems getting clients or others requesting image files to provide all the information you need to deliver optimized files you may want to make use of the File Delivery Checklist.Read more in File Delivery Checklist

Always include a delivery memo with your file

Be sure to deliver your files with a delivery memo that outlines the technical specifications as well as the terms of use. The delivery memo should travel with the file. If delivering on tangible media (CD, DVD, BluRay, etc), provide a paper copy and burn a .PDF or .TXT version onto the disk. If delivering electronically, embed a .PDF or .TXT version with your file using a non-destructive compression format like .ZIP to ensure the client can’t receive one without the other.

A software application that edits image files by using instructions saved as metadata. Examples include Camera Raw,, Capture One Pro, and Nikon Capture. Also see Parametric Image Editing (PIE) and Cataloging PIEware.

A visual defect (also called banding) in an image created by insufficient amounts of data to maintain the appearance of continuous tone. Posterization can be result from overly aggressive image editing (typically curves or levels adjustments) that forces adjoining (but different) pixels values to all assume the same value. It can also be caused by color transforms and working with an insufficient bit depth to sustain the subtle gradations within an image. The effect often becomes visible first in shadow detail and large areas of continuous or uniform color (blue skies). Digital noise can also create or contribute to posterization as well as the failure of output devices to render subtle differences in tonality.

Typically described as the unwanted color or luminance variations of pixels that degrade the overall quality of an image. Digital noise is often equated with excessive film grain in analog photography. Noise can result from a number of different sources including a low signal-to-noise ratio, the use of high ISO settings, long exposures, stuck sensor pixels, and demosaicing artifacts. It can range in appearance from random color speckles (sometimes called the Christmas lights effect) to a luminance based grain-like effect, or banding. There are a variety of in-camera and software based noise reduction solutions available. Digital noise can also be intentionally added to an image to enhance the effect of grain or to reduce banding (caused by posterization or the failure of an output device to render subtle tones) in large areas of continuous tone or color such as a blue sky.

Also known as color fringing or halos, is caused when a camera lens does not focus the different wavelengths of light onto the exact same focal plane. The effect is visible as a thin colored halo around objects in the scene, often the border between dark and light objects.

Defines how many bits of tonal or color data is associated with each pixel or channel. For example, 2 bits per pixel only allows for black or white. 8 bits provides 256 grayscale tones or colors. When referring to an 8-bit color image, 256 is multiplied (256x256x256) by the three primary (RGB) channels to create what is commonly called 24-bit color (with a possible 16,777,266 colors).

The range of color (and density/tonal values) that can be produced by a capture or output device or represented by a color space.

A raw (or camera raw) file is the unprocessed linear data captured by a digital camera sensor and any associated metadata. It can be likened to the digital equivalent of a latent image but with the ability to be infinitely reprocessed or developed. In most cases, cameras write raw files using a proprietary file format. Raw files give the photographer the advantage of managing image processing during post-production rather than allowing the camera to make the processing decisions, as happens when shooting JPEG. Also see DNG and Linear Data.

Pixel Editing applications use of layers to stack one “page” of data on top of another. Layers may contain data from a variety of sources, including duplicate pixels from a layer above or below. Photoshop currently supports 4 types of layers: Raster, Vector, Adjustment and Smart Object. Layers may optionally house embedded special effects such as smart filters, drop shadows, embossing and more.

In image processing or publishing applications, a mask is a defined area used to limit the effect of editing/processing operations. There are a number of different types and techniques that include channel, clipping, layer, raster, and vector masks. A wide variety of selection tools can be employed in software such as Photoshop to aid in the creation of masks. There are also dedicated applications and plug-ins for the express purpose of masking.

Applying tonal or color adjustment such as levels or curves directly on a raster layer mathematically redefines the pixel data the moment you hit save. Adjustment layers allow you to preview those same changes without actually applying them to the pixel data. Tonal and color adjustments made with adjustment layers remain non-destructive until they have been applied to the pixel layers below through merging or flattening.

Raster layers consist of an array of mathematically defined pixels, where each pixel describes a unique point on the image plane. The “Background” layer in flattened Photoshop files is always a raster layer. Raster layers can be duplicated and altered in a wide variety of ways. Changes applied to the pixel data in a raster layer become permanent with regards to that layer but do not affect the layers above or below it. Scaling raster layers is inherently destructive as upsampling requires new pixels to be invented and downsampling requires pixels to be thrown away.

A process that combines multiple exposure variations of an image to achieve a dynamic range exceeding that of a single exposure. Tone mapping algorithms are used to blend the exposures into a high-bit (typically 32 bits) file format that can them be converted down to either 8 or 16 bit for printing or web display. Depending on the type of tone mapping and the degree to which it is employed, the resulting images can range from natural looking to very surreal.