Northlight Images photography
Articles, reviews and tutorials about photography
Home About us Commercial Photography Print Gallery Articles/reviews/blog  
Thanks for visiting - I hope you find
our site helpful and interesting.

The site is largely supported by
people buying things (anything
at all) via our links.

Info about how you can help
us run the site, often at
no extra cost to yourself

Page contents

8 bit histogramDigital Black and White - working in 16 bit

When is 8 bit not 8 bit?

Why convert your 8 bit (colour) RGB images to 16 bit RGB before converting to black and white?

Actually it can make a noticeable improvement to your black and white images, particularly when you edit them.

Something for nothing? - 10 bit images from 8 bit

In this short article, Keith shows how an 8 bit RGB file (such as a JPEG) can actually be the equivalent of more than 8 bits of greyscale information, when doing your conversions in Adobe Photoshop.

Could the benefits of 16 bit apply to 8 bit images as well?

This technique can have benefits if you are going to be applying many adjustment curves to your images.

As ever, any comments are welcome...

digital black and white logoKeith runs a LinkedIn group (~7900 members) for people interested in any aspects of modern Black and White photography: Digital Black and White

Why 8 bit RGB can be 10 bit greyscale

Lets say I have a JPEG colour photo and I want to convert it to black and white.

Now there are a number of different ways of converting colour to black and white and I covered some of the basic principles in my introduction to digital black and white article.

You would think that converting your 8 bit RGB image to 16 bit RGB before converting to B/W achieves nothing - there is no extra information.

Well it's not quite that simple and if you want to get the best black and white images to work on, then it might be worthwhile...

What's in an 8 bit image file

In an 8 bit RGB file there is only a limited range of pixel RGB values in the shadows (or darker parts of the image). There are several factors that affect just how many you have to play with when you start applying adjustments to the data.

The sensor in your camera
- it has a linear response to light, compared to the human eye and film. This means that there is much more information for the brighter parts of the image. Sensors tend to produce at least 12 bits of data per channel. This gets reduced to fit into 8 bits for a JPEG (and compressed as well, but we'll ignore that)

Gamma encoding
Both sRGB and Adobe 98 are gamma 2.2 spaces. The gamma means that more levels are allocated to darker parts of the picture, to allow for the eye's increased perception of shadow detail.

If you think of the first (brightest) 5 Stops of light levels in your image, we get:

Brightness Number of levels in an 8 bit 2.2 gamma file
1st Stop (lightest) 69
2nd Stop 50
3rd Stop 37
4th Stop 27
5th Stop (darkest) 20

Figures are from Luminous Landscape site - I've not calculated them exactly

Note that the figures only add up to 203, so we have levels left over for even darker parts of the image.

Converting Colour to Greyscale

Consider one pixel in an 8 bit sRGB file, with RGB values of R=20 G=20, B=20 (20/20/20), it will on straight conversion (averaging the channels) to a Gamma2.2 greyscale image, give a value of Luminance (L) = 20

The difference comes with converting a value like 20/20/21 to greyscale - it will also give L=20 (I'm assuming a simple averaging conversion here - the principle holds for other conversions that make use of the different channels) So we get the same value L=20 for inputs of 20/20/21, 20/21/20 and 21/20/20.

Note. It's important to remember that we are using integer arithmetic where 60 divided by 3 gives 20, as does 61 divided by 3

If you take the 8 bit RGB file to 16 bit RGB then:
20/20/20 goes to 5120/5120/5120 > L=5120
21/20/20 goes to 5376/5120/5120 > L=5205

That's 2 levels of grey where in 8 bit you would only have one

With the simple averaging conversion 5376/5120/5120 gives the same as say 5120/5376/5120, but with even the basic 'Image>Mode>Greyscale' option you would get different L values.

With the channels mixed in the proportions 30%:60%:10% (simple 'Image>Mode>Greyscale') we get

20/20/20 goes to 5120/5120/5120 > L=5120
21/20/20 goes to 5376/5120/5120 > L=5197
20/21/20 goes to 5120/5376/5120 > L=5274
20/20/21 goes to 5120/5120/5376 > L=5147

That's 4 levels of grey where in 8 bit you would have two (20/21/20 goes to L=21).

If you include the full range of values between 20/20/20 and 21/21/21. The 16 bit conversion gives 8 different L values instead of two -- that's effectively a 10 bit greyscale rather than 8 bit.

So, as you'd expect, the RGB value for a pixel that is slightly 'greener' comes out a bit brighter in the greyscale conversion, due to the 60% weighting for that channel.

Note, I've ignored the fact that Photoshop '16 bit' is actually signed 15 bit i.e. +-32k rather than 0-64k)

The difference comes from the fact that an 8 bit RGB file represents 24 bits of information which, depending on your choice of conversion technique, can represent more levels of greyscale that the 256 allowed in an 8 bit greyscale image.

Thus for the example in the table above, and using a simple conversion to greyscale (at 16 bit), you could get up to 80 levels of greyscale information in the 5th Stop, rather than the 20 in the 8 bit file.

So what? ...

What brings this fact from an academic exercise into practical usefulness is the limited range of levels in the shadows of an 8 bit greyscale file. This means that it may not take too much adjustment to show a bit of posterisation or some other artefact in the shadows. It might show up in brighter parts of the image as well, but there are slightly more levels to use, and the eye is less sensitive to changes in the lighter parts of images.

By converting your files from RGB-8 to RGB-16 to greyscale-16 you are just getting a bit more out of the original and avoiding errors that are more likely to accumulate with 8 bit maths. I'm not aware of the actual maths used within Photoshop so the numbers above are just examples to illustrate the point. I also suspect that with many pictures, you just wouldn't notice the difference, but if you are going to shift stuff about much in the shadows, it does help.

There is also a subtle feature in the Photoshop 16 bit -> 8 bit conversion that helps produce better looking results. It seems that a small amount of dither is introduced to help prevent banding/posterisation.

Note I'd appreciate feedback from anyone with more knowledge on how PS actually handles the conversions.

An example conversion

Here is a picture I took in New Mexico of some ice next to a mountain stream one morning.

It's a reduced JPEG file from my Canon 1Ds

ice by stream - colour jpeg

It's a bit dark since I wanted to capture all the sparkling highlights from the ice and water

Here it is converted to greyscale (simple mode change in Photoshop)

ice by stream - simple grayscale conversion

A bit dark, so I'll apply a curve

Ice by stream - after curve application

Much better, and with a bit of masking of the curve to bring back some depth to the shadows in the water, it might not look too bad.

OK, here is the curve I applied.

photoshop adjustment curve

I applied the curve to two different versions of the original 8 bit JPEG.

One was opened normally and converted to greyscale, while the other was opened, converted to 16 bit RGB and then converted to 16 bit greyscale.

After applying the curve and flattening the image, I looked at the two histograms for the images

8 bit histogram 16 bit histogram
8 bit image 16 bit image

Which one would you rather carry out further work on?

It was suggested that the 16 bit one was bound to look better, since I'd applied the curve to 16 bit data

Not so....

Here is the histogram from the following sequence

RGB 8 -> greyscale 8 -> greyscale 16 -> apply curve

curve applied in 16 bit

And just to tidy it up...

Here are the histograms after the 16 bit images were converted back to 8 bit

8 bit original 16 bit original
8 bit 16 bit

Back in the real world...

Keith Cooper, photographerThank you for supporting our site.
The articles and reviews are written in my spare time - I really do appreciate all the people who have taken the time to write to me to say when they have been useful.
Could you help? -- I'm determined to keep this site 100% free, but if you'd like to contribute at no extra cost to yourself then just use one of my links to visit an Amazon site or other supplier when you want to buy something.
If you follow a link below and then buy absolutely anything (not even camera related) we get a small commission

Amazon UK / Amazon France / Amazon Germany | Amazon USA / Amazon Canada / Amazon Italy | B&H | Adorama | Macphun | Topaz
| Wex (UK)
(Other ways to help the site)
Just found the site via the rumours pages? - please do have a look round the articles and reviews, since they are far more important to me, in helping people get more out of their photography.
Thanks again - Keith and Karen at Northlight Images

So, there you have it, there is a difference. The only question is when to actually take notice.

As to everyday use - your mileage may vary :-)

I've got a raw file of the sample image which I'd have used anyway, since I do most of my black and white conversions from Raw->16 bit colour->16 bit greyscale.

I do work in 16 bit whenever possible to minimise the destructive effects of multiple adjustment layers, particularly with my black and white work.

There is also the matter of just how well your B/W printer/driver converts the data into ink on paper, many printers will introduce quite a bit of posterisation and banding on their own.

Some related articles

The views in this article represent those of Keith Cooper.
Keith is always happy to discuss matters raised in his articles. You can Email Us Email Us
Northlight Images prides itself on its independence when giving advice. We do not sell hardware or software and have no direct commercial links with any of the software or hardware vendors that may be mentioned here. See our Review Policy for more information.

Our reviews never recommend the 'best product' for you - see why this matters at:
Why we never recommend the best

You can search all the many hundreds of articles and reviews on the site for more information

Have you found an article on the site useful or helpful?

If so, please consider sharing a link to the article or mentioning it on a forum or blog - Thanks to everyone who's helped the site become better known.

Explore our site... Digital Black and White photography and printing - some of Keiths thoughts, techniques and tips for those interested in a digital approach to black and white. There are many hundreds of entirely free articles and reviews on the site. New site content appears on the News, articles and reviews page.

Northlight Images is based in Leicester in the UK and supplies Commercial Photography services.

Visiting Leicester? - see hundreds of Keith Cooper's local photos at our Leicester Photos site