10 апр. 2011 г.

About color depth


Why 16-bit color space is better than 8-bit and where does banding in gradients come from?



It is easiest to explain by example. Create the 8-bit image 900x900 pixels and fill it with a uniform gradient from white to black.


Now, edit it using levels, greatly raised its contrast.


Result is typical banding.


What we actually did? Put the whole palette of 256 colors in a shorter piece of the image, which does not contain enough information about the color that would fit this palette.
Consequently, that would get rid of the banding we need more color information. Let's repeat all above with one difference: do everything in 16-bit color space. You can specify the bit depth on image creation or later in the "Image" tab.


8 bit has 256 levels per channel and a 16 bit image has 32,769 levels per channel (rgb).


Banding, of course, still seen, but only on zooming in. Using 16 bit images is the right solution for images to be edited. 8-bit image is "dead". It's like a burnt pot, a form which can not be changed. We can only break it. 16-bit image is like clay.

Another small example that will help you understand what 16 bits different from 8. I brought a previously created in 16 bit space gradient (without contrast). And with the help "info" palette measured the color value of the three adjacent pixels in both color spaces.


Thus, 8 bits space sees no difference between the three pixels (all at 126), while in 16 bit, they are different. The human eye is, incidentally, also did not see any difference, but the information which is in 16 bits is critical when it comes to image editing. When you add a contrast to 8 bit image, this place will be the stripe of one shade and 16 bits will be three stripes of different shades. And these shades will already be visible to the human eye.
In fact 16-bit does not contain more color, but contains more precise information about it. If imagine a color space as the 30 cm ruler, we can say that the 8 bit image calculates the color in cm, and 16 bits calculates it in mm.

One of the most frequently asked questions that what would be if 8 bit image convert to 16 bit. The answer is: it makes no sense. This is the same as to pour the wine from a small glass to large and hope that the will be more wine. The image must initially create in 16-bit color space and convert to 8 only when you not expect to edit anything more.


What to do if you have already 8 bit image and want to get rid of the banding
Add noise. This is the most common advice. I have a lot of "googling" and I have to tell that the people added noise a ten years ago and now continue. But I think this is a last resort, when there is no way to work in the higher bits. Why does this trick works? Slight noise blurs the boundaries between the steps and they just become more difficult to detect to the human eye. By the way when you create a gradient in Photoshop and check "Dither", Photoshop carefully adds noise to the newly created gradient for you.



How this knowledge will be useful in practice?

For 2d artists:
Create an image in 16 bits, it will painlessly in the future to edit the color. Soft brush blends also nice. This is especially important for images with large no textured surfaces.

For 3d artists:
Save your renders in 16 bit *.tif files without compression. It's practically the most juice. There are still able to save a 32-bit, but that's what I tell you later, in separate lesson. With 32 bits you can do magic :)

For photographers
Some cameras supports export of raw files, which contain more information than a jpg-file. Most often it is 12 or 14 bit images. What's important when you import such as 12 bit images in Photoshop: specify that you want to work in 16 bit space (photoshop asks). Otherwise, 8 bits will cut all the precious additional information.

Disadvantages of a 16-bit

-16 bit files has bigger size (about 2 times)
-Photoshop does all the operations slower. On old computers it can become a big problem.
- Also saves files a very long time
For example, my latest project: the file with 28 layers 9500x7000 in 8 bit saved 2 minutes 50 seconds and 16 bit - 10 and a half. That is already possible to go to drink tea :)
- There are some filters and file formats that not available when you work in 16 bit color space. But this disadvantage never was a hindrance for me.
Turquoise color for these formats and filters that not available in 16-bit:


Fell free to ask any questions. Write, if you find any mistakes or inaccuracies.

1 комментарий:

  1. Hello
    I'm not that good English Language well, but I understand from your words that
    16-bit
    The credit of the
    8-bit
    In drawing
    Oki
    What Raúak Ba 32-bit?
    Thank you

    ОтветитьУдалить