I am learning to use my new DSLR, a Sony a57 with 18-55mm kit lens. I was shooting last night at sundown, and after exporting the RAW images to Lightroom, was surprised to see the gradient as showing blocky areas. I was shooting with ISO 200, with .4sec exposure and f22.

I have exported this to JPEG, I know this will increase the blockiness via compression but have checked the RAW and JPEG side by side and they RAW also displays artifacts...

What cause blocky artifacts in the dark blue sky in these type of shots? Could adjusting the exposure cause this to be a smoother gradient?

Here is the actual shot taken:

enter image description here

  • 5
    \$\begingroup\$ Can you post a sample (direct RAW->png, ideally, so we avoid JPEG entirely)? \$\endgroup\$
    – mattdm
    Commented Feb 8, 2013 at 23:46
  • \$\begingroup\$ )You should now have enough upvotes to post a sample. This will really help us identify the type of artifact you're seing.) \$\endgroup\$
    – mattdm
    Commented Feb 9, 2013 at 0:16
  • \$\begingroup\$ It is probably quatization noise. If the picture was properly exposed with most any decent camera, then there should be enough color resolution to avoid the artifacts in the raw file. However, you will still see them on the monitor because it only displays using 256 shades per color. \$\endgroup\$ Commented Feb 9, 2013 at 0:58
  • 1
    \$\begingroup\$ The raw file should just give you numbers per physical pixel, where different pixels have different color filter associations. One pixel might be red spectrum. Normally this all has to be converted to an RGB format with some interleaving of colors before it even goes to compression. To display the RAW file, this conversion has to be done before it gets to the monitor or a PNG file. The PNG file will represent a perfect RGB image, not the original RAW. The process of making the RGB can still have some blocking in it at high noise. \$\endgroup\$
    – Skaperen
    Commented Feb 9, 2013 at 1:20
  • \$\begingroup\$ have you set noise reduction very high when you are "viewing the raw"? How dark a blue are we talking about here? \$\endgroup\$ Commented Feb 9, 2013 at 2:07

4 Answers 4


I think the other answers may have missed the issue here.

Seeing compression artefacts on a RAW file in Lightroom is quite a common issue and it drove me nuts when I first encountered it. It turns out what you're seeing is just regular JPEG compression in the preview image that Lightroom generates. For performance reasons, in the Library module Lightroom only loads the preview and not the original RAW. The banding should disappear when you switch to the Develop module and the RAW is loaded. (Sometimes you'll find you need to zoom in to 100% and back out to force load the RAW - that seems to be an intermittent bug.) You're absolutely right that you shouldn't be seeing those blocky artefacts in a RAW file.

You can force Lightroom to generate higher-quality previews with fewer JPEG artefacts by going to Edit > Catalog Settings... > File Handling and set Preview Quality to High.

  • \$\begingroup\$ In addition, from further research, it seems to me that I am seeing general noise from the RAW file, as it is unedited entirely (including any noise reduction from in-camera processing). I think this is a beginner problem more than anything! I am very grateful for your input :-) \$\endgroup\$
    – pharma_joe
    Commented Feb 12, 2013 at 2:53
  • 1
    \$\begingroup\$ I was noticing the same issue and wondered the same thing - I thought, "It looks awfully like JPG artifacts - I can see blocks that are consistent with JPG compression" when I magnified by 400% even though I was using only RAW files. Thanks! \$\endgroup\$
    – netrox
    Commented Aug 2, 2015 at 16:02
  • \$\begingroup\$ @netrox Your raw files may be 14-bit, but the monitor with which you're looking at them isn't - it's only 8-bits. The application you are using to view them has to convert and compress the raw files to be able to display them on an 8-bit monitor. \$\endgroup\$
    – Michael C
    Commented Jul 23, 2016 at 8:36

This problem can be one of a few things:

  1. Posterization caused by JPEG image compression when over-compressing a JPEG.
  2. Posterization caused by low color information in lower signal areas.
  3. Quantization caused by high bit depth, wide gamut image information being displayed on a low bit depth computer screen.

First, for case #1, the solution is really to use less compression. Smooth gradients do not compress well, as compression really ends up doing the same thing that causes cases #2 and #3: bucket rich color information into anemic color information.

Regarding case #2. At the low end of the image signal range (the shadows and lower mid-tones), sometimes colors in a gradient organize into large bands of the same color separated by discrete steps. It may only be a difference of a one or a very few levels between one band in a shadow gradient and another, but that difference can often be detected by our eyes (which are very sensitive to changes in luminance, especially when the bulk of that luminance is similar in tone.) Sometimes minor discrete changes in luminance are rendered incorrectly due to a lack of precision in rendering algorithms or a lack of bit depth (which is actually really case #3...but we'll get to that). At the high end of the signal range, there tend to be many more levels available, and gradations can be much smoother using more changes in tonality, so banding does not show up as well in brighter photos or brighter areas of a photo than it does in middle toned and shadow areas.

Leading on from case #2 is case #3: bit depth. Most digital photographs these days are capable of representing a far, far richer set of data, both in terms of luminance and gamut, than the average computer screen is capable of. Most cameras are 12 to 14 bit, thus producing two to four orders of magnitude more color information than the average 8 bit computer screen is capable of. This causes quantization of color information when it is transformed from its original color space (that of the camera device, 14-bit RAW image and ProPhotoRGB gamut most often) into the computer screen color space, usually 8-bit sRGB gamut. That transformation has to group the greater volume of colors into a lesser volume of colors, and at a lower precision to boot. The result is often posterization and what some would call "noise" or "grain" in gradients.

There is nothing actually wrong with your image, it is still there, in tact, in all of its original high-precision, high bit depth, wide gamut beauty. Your hardware is simply incapable of handling it in it's native form. Modern software and hardware is usually capable of dithering during this transformation from "high" to "low". That is the source of the "grain" that many can see, however that graniness is actually the reason the posterization does not look a lot worse when viewing a 14-bit image on an 8-bit screen.

The solution to case #3, and to a degree case #2, is to upgrade to better hardware. Better hardware could be a better video card that is capable of crunching more complex pixel shaders. Increasingly these days, image editors like Photoshop are moving to GPU-based rendering. The average consumer-grade gaming GPU is geared for speed, and to achieve that speed, precision is often sacrificed. Switching to a professional-grade GPU, like Nvidia Quadro, will usually allow more precise rendering of the kind of shaders used in a tool like Photoshop (and, hopefully, Lightroom 5 when it finally hits.) That should help alleviate some of case #2, where it is caused by lower precision rendering algorithms.

Moving to a professional-grade video card like a Quadro will also open up another avenue: 10-bit displays and high bit depth hardware LUTs (color Look Up Tables.) Screens from the likes of Eizo, NEC, LaCie, etc. are usually capable of 10-bit rendering from a 12, 14, or 16 bit hardware LUT. The high bit depth LUTs allow for billions of colors, and the 10-bit displays are able to render those billions of colors using advanced hardware dithering (this actually achieving real-time display of all 12 to 16 bits of color information by interleaving the extra color information over time via the 60hz refresh rate). Using a 10-bit display with a 14 or 16 bit LUT will effectively eliminate any posterization when editing 14-bit RAW files. The catch here, though, is that you must use software that is actually capable of taking advantage of 10-bit displays, their LUTs, and the GPU's that drive them. Some Adobe software like Photoshop CS6 supports this, but only when you have a professional-grade OpenGL GPU like Quadro, a DisplayPort (neither DVI in any form nor HDMI will work) connected to a legitimate 10-bit display.

  • \$\begingroup\$ I calibrated my monitor which has made a huge difference. At the moment I am running a Mac mini, which I believe has on-chip GPU, possibly not the greatest quality. Thanks for your help! \$\endgroup\$
    – pharma_joe
    Commented Feb 12, 2013 at 2:56
  • \$\begingroup\$ I'm glad it worked. Sometimes it does, sometimes it does not. Even when it does work, it may only fix some ranges of tone, while making the problem apparent in others. Calibration is a bit of a two-edged sword here. The two primary causes are either JPEG compression, or the bit depth of the screen. These days, 8-bit screens are increasingly showing their limitations relative to the 14-bit cameras we have, which are theoretically capable of representing 4.4 trillion colors...a far finer precision and gradation than the 16.8 million of an 8-bit screen. \$\endgroup\$
    – jrista
    Commented Feb 12, 2013 at 4:37

You are probably seeing noise. Very common in underexposed skies.

Also you may be seeing banding, also common in underexposed skies where there is limited information (all pixel values about the same and at the low end of the histogram)

The best way to avoid this is to increase the exposure. You can expose to the right (expose so that more of the histogram is to the right) then adjust the exposure back down in post-processing to bring out the colours in the sunset.

You can fix in post processing using anti-noise software. Ironically you can fix banding by adding a bit of noise back in!

  • \$\begingroup\$ The histogram did have high values in a short range towards the lower end. I think I'll try again this evening after reading up on 'shooting to the right'. Thanks for your help! \$\endgroup\$
    – pharma_joe
    Commented Feb 9, 2013 at 2:16

Remove any filters that you may have on your lens. Take a photo of a white wall or white piece of paper in even lighting. If you are still seeing the gradient, try taking the picture upside down and also try another lens. If it happens with both lenses or if the gradient appears in the same direction regardless of shot, then you might have a damaged sensor. You may want to post links to a few images showing the gradient so we can better judge.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.