Understanding Compression and Visual Distortion in Photography

Compression is a graphic distortion which occurs in a photo when image information is reduced or heavy editing is applied. One of the advantages of the JPEG file format is that its architecture allows for easy bit reduction which causes the file to get much smaller for fast transfer and convenient storage. But it is also one of its downfalls because this process is irreversible, once a JPEG file has been naturally reduced, that information is lost and cannot be retrieved later. Once in a while I will see a photographer reducing JPEG file during save for faster loading on a website without keeping the original and then being surprised that a print came out in such a bad quality.

JPEG uses lossy format compression, which is a data encoding method that allows some loss of information in favor of reducing the actual number of bytes. In many cases, if the file’s resolution is large enough, the degradation in quality might not even be visible on your screen, especially if not viewed at 100%. However, if enough of the bytes are lost the image can suffer from a loss in quality, which can be amplified in print, because printers need more information to create an image than a screen does. This loss of data will often create visual distortions called compression artifacting such as ringing, banding, contouring or posterizing. But these problems are not exclusively created during a save process, they can also occur during extensive editing or even naturally when working with a small sensor cameras.

Types of Visual Distortions (Artifacting)

  • Ringing – this graphic distortion is typically visible on sharp transitions, such as text. This distortion creates an effect often called “ghosting” which is essentially several blurry duplicates of a sharp line right next to it, making it fuzzy and hard to read.
  • Banding – this visual distortion usually appears in areas with color gradients. Banding creates sudden changes from one color to another, creating visible sharp bands where your eye expects to see smooth transition between colors. This problem is predominant with heavy post-processing and can often be corrected by applying some noise.
  • Contouring – similar to banding this distortion is usually apparent in areas with gradually changing colors such as cloudless sky. It usually appears in choppy/ blocky steps between different shades of color and it gives the photo an unnatural, digitalized feel.
  • Blockiness – this distortion creates a blocky almost checkerboard style image. Depending on the amount of compression these can either be slightly visible in “busy” areas with lots of texture when viewed at 100% or be clearly visible throughout the entire image.
  • Jaggered curves – this visual distortion creates a staircase-like appearance to what otherwise should be a smooth straight curve or line.
  • Posterization – this distortion is closely related to banding but it’s usually refers to areas where colors are simplified (color or bit depth decrease) to a point where most colors unnaturally blend flattening an image or gradients abruptly separate into different batches of color. Where banding usually refers to large gradient areas of an image such as clear sky, posterization often refers to texturized regions.

Minimizing Compression

There are several things you should be aware of if you need to minimize compression problems in your images:

Shoot with DSLR. Compact cameras usually have small sensors which have many megapixels crammed into it. This causes lower image quality and potential for artifacting. Additionally, when a camera saves JPEG image to a memory card it automatically performs some level of compression. Compact cameras usually have less processing power to do a thorough in camera compression and typically lack any control over its amount.

Shoot RAW. RAW and TIFF file formats have a lossless architecture which does not lose any information, this ensures that you will always have the highest quality file. However, it means that the files size will be much larger, but with ever decreasing storage prices this becomes less crucial.

Edit in 16-bit. When you are editing RAW files, open them in 16-bit TIFF format in your editing software. This will give you more leeway on adjusting contrast, curves, sharpening and saturation with less visual distortions. However, keep in mind that editing large 16-bit files adds more strain on your computer and lower end models might not keep up with your workflow.

Keep originals. If you choose not to shoot in RAW, then consider to always keep a separate folder with all original files. When editing or compressing a file, do not overwrite the original, but rather save as a new file. This way if you notice problematic areas down the road you can always go back to the original file and re-save or re-edit it.

Moderate your editing. Some photographers go overboard on post-processing. Over-filtering can often lead to an increase in graphic distortions and introduce new issues into an image.

Consider photo’s use. If you intend to only present your photo on screen then during final save what you see is what you get. If you don’t see harsh visual distortions then it will probably looks just fine on other screens. There is no need for a 10 or higher megapixel image to be saved at full resolution without compression for posting online. However, if you are planning on printing your image, or selling it as stock photo, then you have to carefully view your image at 100% and preferably save at maximum quality settings. When an image is printed, visual distortions can be amplified and become more prevalent, even if they are not noticeable on a screen.

Keep your screen calibrated. When a screen is properly calibrated there will be no surprises when an edited image is printed. But if the screen has never been calibrated your photo might look very different in print or on other screens.

Use filters. Finally, if you have enough experience with your camera and compression you might be able to predict that certain scenarios will lead to some compression issues. For example: photographing clear sky has always produces some kind of artifacting. In this case consider using a polarizing filter for your lens. This can improve your image quality and reduce some graphic distortion issues.