View Full Version : Please explain 16 vs. 8 bit...
sigler
2nd of October 2003 (Thu), 18:16
With Photoshop CS on the way, and all of it's RAW capabilities, please explain the difference between 16 bit and 8 bit. What is the difference? Why do some PS filters work in 8 but not in 16 bit modes?
Thanks for any input!
Rob
lightandlife
2nd of October 2003 (Thu), 20:21
Colors, like any other digitized information, are coded in binary numbers (0's and 1's).
With 8 bits, 2 ^8 (= 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2) = 256, and hence you would get at most 256 colors. To each of R, G and B, you can assign either 2 or 3 bits. For instance,
RRRGGGBB
With 16 bits, you get 2^16 = 65,536 or about 65,000 colors.
Using R(ed), Green and Blue, a typical color could be expressed, for instance, as:
RRRRRGGGGGBBBBB
and one bit is redundant. Each R, G or B may represent a certain shade of the color chosen.
With 24 bits, 2 ^ 24 = 16,777,216 or more than 16 million colors.
If filters are designed for 8 bit color, it has only a few colors in its palette.
In 24 bit system, colors would be represented by three sets of numbers (in 8 bits). In decimal numbers that we would understand, white would be written as:
255, 255, 255
and black would be written as
0, 0, 0.
32 bit system may not be as efficient. If 32 is divided among three colors, each color gets 10 bits and there are some residuals. Each color would get at least 10 bits and 2^10 (2 to the 10th power) = 1024. Thus, white might be (I am guessing) represented by:
1023, 1023, 1023
and
0, 0, 0.
The left over 2 bits are redundant.
Some computers now use 64 bit. If it is split among three colors, each color would get at least 20 bit. This means each of R, G and B can be differentiated in over a million shades. As the bit size increases, we can differentiate more colors.
toddb
2nd of October 2003 (Thu), 20:25
2^8=256
2^16=65536
So to look at this another way, each '0' represents say 64 pieces of data, so it will fit here:
8bit:
0000
16bit:
00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 000000000000000000000000
Get the picture?
sigler
2nd of October 2003 (Thu), 20:33
So when converting raw to jpeg, does jpeg save info in 8 bit mode? How can I take advantage of having a 16 bit pic?
Thanks for helping!
lightandlife
2nd of October 2003 (Thu), 20:56
It apperas that the 16 bit converter actually uses 12 bits only. It produces only 4096 (=256 x 16 = 2^12) colors.
Breezebrowser and other software may give you 16 bit colors, but I have not used any. Others will give you more hints.
If one is going to produce only 4"x6" prints or for Internet, RAW may not be needed.
Guillermo Freige
2nd of October 2003 (Thu), 21:03
Some things:
First, when PS speaks about 8 or 16 bits, it refers to bits PER COLOR CHANNEL, so in fact the color word is 24 or 48-bit long. As counterpart, in lighandlife example 8 bit means 8 bit for the THREE channels togheter, so PS 8bit space is equivalent to light 24bit explanation, not 8bit one. Also PS (and in fact most monitors) uses a 2.2 gamma nonlinear space as default.
Second, RAW files have a 12-bit linear (1.0 gamma) luminance space, so, during JPEG conversion, the 12-bit image is color interpolated and gamma corrected to 2.2 and downsized to 8-bit per channel. Not many values (if any) in the lowest luminance levels are discarded, but a lot of them are thrown out mostly in the brightest parts of the image, because most of the image values data is in the bright areas.
As a counterpart, if you saves the image as a 16-bit image, there is a lot of extra precision to save a 12-bit gamma corrected image without discard any image data. This is why is important a good 16-bit image handling in PS and other image editor programs, because you can work and postprocess with all the image info, and make all the gamma and level and curve correction you want in 16-bit space, before saving the final one in 8-bit (jpeg, tiff or your favorite 8-bit image format).
To read a more coherent explanation of the luminance values distribution in a 12-bit linear space go here:
http://luminous-landscape.com/tutorials/expose-right.shtml
Dave I
3rd of October 2003 (Fri), 00:42
As Guillermo said, lightandlife is a bit mistaken on what "8 bit files" and "16 bit files" are.
By the time the RAW converter gets done with the sensor data, you have 12 bits of color information per color per pixel, 36 bits of information per pixel total (there are three color channels - Red Green and Blue : 12R + 12G + 12B = 36).
Since there aren't any normal file types that store 12 bits per color, the RAW converter has to use an 8-bit file (8 bits per color, 24 bits per pixel) or a 16-bit file (16 bits per color, 48 bits per pixel).
Naturally, since you can't actually fit 12 bits into 8, you'll be 'throwing away' some information when you use an 8-bit file. Instead of having 4096 different values for each color, you'll only have 256 each. If you convert to a 16-bit file, you have plenty of room - they can store over 65000 values per color per pixel.
The reason 16-bit files are better is that a lot of Photoshop operations will effectively 'throw away' information. If you do some heavy curves/levels work, you might end up throwing away half or three-quarters of the information.
Say you did very severe adjustments, and threw away 75% of the information per pixel, for example. You'd end up with 1024 values left per color per pixel in the 16-bit file (25% of 4096), but only 64 values left per color per pixel in the 8-bit file (25% of 256). Only 64 values per color would give you a very poor image.
Sorry that was so complex; it's a tricky subject.
gjdagis
3rd of October 2003 (Fri), 11:04
I guess the simple way to say it, in light of all the previous VERY GOOD technical data is:
If you want the best possible pics:
1) Shoot Raw
2) Make ALL corrections and adjustments in 16 bit
3) Save in the format of your choice 8 bit.
(keep the RAW as archive)
You can always go back to the RAW image and do it all over again (if you're a masochist)
Agreed?
George
bluebomberx
3rd of October 2003 (Fri), 11:11
Here is a good website that briefly demonstrates the virtues of 16 bit editing. Lumika.org (http://www.lumika.org/gear_nikon_scan_bit_depth.htm)
-Richie
Dave I
3rd of October 2003 (Fri), 12:38
gjdagis wrote:
I guess the simple way to say it, in light of all the previous VERY GOOD technical data is:
If you want the best possible pics:
1) Shoot Raw
2) Make ALL corrections and adjustments in 16 bit
3) Save in the format of your choice 8 bit.
(keep the RAW as archive)
You can always go back to the RAW image and do it all over again (if you're a masochist)
Agreed?
George
Almost. Some corrections and adjustments don't really need the extra bit-depth. Levels and curves are the biggest bandits. Many other adjustments can be done in 8-bit without too much harm.
In PS7, it can be much more convenient to do the Levels, Curves, and any white balance adjustment in 16-bit, then convert to 8-bit to get more power from the application (since so many things don't work in 16-bit). Most 'smart' sharpening tricks require layers and channels, for example. If you stay in 16-bit mode, you can't use them without a LOT of hassle.
Naturally, this will change in PS-CS, with its enhanced support for 16-bit files. Which is why so many people are so eager for it :)
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.