# 16-bit to 8-bit conversion question



## kkamin (May 24, 2010)

Imagine I'm editing in 16-bit in Photoshop and doing a lot of tonal adjustments and remapping (things that work splendidly in 16-bit), and I have a multi-layered PS file with a bunch of adjustment layers and my original image.  If I then convert to 8-bit, will I still benefit from starting in 16-bit or will those benefits disappear since I have a multi-layered file with the adjustment layers now remapping an 8-bit file?  

Do I need to have a flattened image before converting from 16-bit to 8-bit to retain the benefit?

Confused.

Thanks for reading.


----------



## KmH (May 24, 2010)

kkamin said:


> Imagine I'm editing in 16-bit in Photoshop and doing a lot of tonal adjustments and remapping (things that work splendidly in 16-bit), and I have a multi-layered PS file with a bunch of adjustment layers and my original image. If I then convert to 8-bit, will I still benefit from starting in 16-bit or will those benefits disappear since I have a multi-layered file with the adjustment layers now remapping an 8-bit file?
> 
> Do I need to have a flattened image before converting from 16-bit to 8-bit to retain the benefit?
> 
> ...


Yes and no.

8-bits can only render 256 colors, so you lose the much broader gamut the 16-bit depth accords.

No, you don't need to flatten the image before converting to the 8-bit depth. That way you can use the editing tools/functions that are 8-bit only in any of the regular layers, or add adjustment layers in 8-bit mode, that are non-destructive.

However, when the image is saved in 8-bit mode as a JPEG and several other formats, the layers will automatically be flattened.


----------



## Garbz (May 24, 2010)

Gamut and bitdepth are two entirely independent concepts. The only way in which they relate is that if you have an image with a wide gamut colour space an 8bit file no longer can rep-resent each individual colour leading to banding in smooth gradients. 


And here's a little known caveat. You DO need to flatten the image before you set it to 8bit. If you don't flatten the image Photoshop will convert all layers to 8 bit, process in 8bit and dither any colours that it thinks it's getting wrong. This is not very well advertised unfortunately, and you lose all benefits of the original 16bit edit.


So to keep the highest possible quality:
1. Do work in 16bit.
a2. Click File -> Save for Web to create your 8bit JPEG. (The settings in the save for web dialogue including resize do not affect the original image).
a3. Separately save a multilayered TIFF in 16bit if you wish or keep working. 

b2. When finished save a multilayered TIFF file in 16bit just incase.
b3. Flatten the image.
b4. Convert to 8bit.
b5. Save image as a JPEG.


----------



## kkamin (May 24, 2010)

Thanks for the info, Garbz, makes complete sense now.  I do have a question about what you said here...



Garbz said:


> The only way in which they relate is that if you have an image with a wide gamut colour space an 8bit file no longer can rep-resent each individual colour leading to banding in smooth gradients.



Is that a danger of working in 16-bit aRGB or Prophoto, when you do a flattened conversion you might end up with banding in once smooth gradient areas?   Wouldn't you see the banding onscreen anyways while working in 16-bit in one of those larger gamut spaces, unless you have a higher than normal bit depth monitor?

Thanks.


----------



## Garbz (May 24, 2010)

Yes there is that danger, but then an extension of what has been already said, a AdobeRGB or ProPhotoRGB file should never be converted to 8bit. 

And yes you would see it, but not necessarily in the same way as someone with a monitor which has a different gamut :S


----------



## kkamin (May 25, 2010)

Garbz said:


> Yes there is that danger, but then an extension of what has been already said, a AdobeRGB or ProPhotoRGB file should never be converted to 8bit.
> 
> And yes you would see it, but not necessarily in the same way as someone with a monitor which has a different gamut :S



But wouldn't a 16-bit AdobeRGB file be converted to 8-bit for printing or to 8-bit sRGB for web viewing?  
Thanks, Garbz.


----------



## Garbz (May 25, 2010)

If you convert a 16-bit AdobeRGB file to an 8bit sRGB file it would no longer be AdobeRGB now would it ;-)

Colour space conversion BEFORE bit depth conversion is the other rule in this game.

As for printing, no. Where you can provide the printing company with the 16bit file. Good printer drivers are quite capable of handling this kind of thing, as are good printing companies. The other thing to note is that if you don't have large smooth gradients, it quite frankly just doesn't matter. A photo like http://farm2.static.flickr.com/1422/1048970286_6f09ea4fc9_b.jpg could have posterisation and no one would notice. Not only because it's a busy photo but because there is also a considerable amount of noise.


----------



## kkamin (May 25, 2010)

I see thanks.  Well, the main printer I use (White House Custom Color) requires JPEGs at level 10.  So if I send them AdobeRGB files, they will have to be 8-bit jpegs.  That's why I am worried, since you said AdobeRGB or ProphotoRGB should never to 8-bit.


----------



## freixas (Jun 12, 2010)

Garbz said:


> If you don't flatten the image Photoshop will convert all layers to 8 bit, process in 8bit and dither any colours that it thinks it's getting wrong..



Your observation makes perfect sense. I'm assuming that you used the word "dither" in a loose way. Photoshop had better not dither colors in converting from 16-bit to 8-bitthat would introduce all sorts of unwelcome artifacts.


----------



## eric-holmes (Jun 12, 2010)

Why save as a .tiff as opposed to a .psd?


----------



## kkamin (Jun 12, 2010)

eric-holmes said:


> Why save as a .tiff as opposed to a .psd?



+1

I had this same question on my mind too.

1. Is it for archival purposes?--to maintain files in a foreseeable sustainable file format?  

2. Will a TIFF file retain all of Photoshop layer information?  Even the more complex stuff?: Smart objects, masks, alpha channels, adjustment layers, etc. 

3. If #2 is true, could I open a layered TIFF file created in CS5 open it in older version of Photoshop and have the program recognize everything?

Thanks!


----------



## Garbz (Jun 13, 2010)

freixas said:


> Your observation makes perfect sense. I'm assuming that you used the word "dither" in a loose way. Photoshop had better not dither colors in converting from 16-bit to 8-bitthat would introduce all sorts of unwelcome artifacts.



As I said. It will and it does, but only if there are layers. 

If you convert to 8bit without flattening the image it will convert the image to completely 8bit. This is lossy. Converting back to 16bit keeps the ugly dithered colours. The only solution is to either flatten the image before saving OR use the save for web and devices functionality.

To give an example:

With this file I started with a 16bit file, added a gradient, added a curves layer dramatically compressed the dynamic range, then added a layer to attempt to expand the dynamic range again. The result of a save for web and devices (which is the same result as if you flatten the image and convert to 8bit):






The results of just a straight convert to 8bit with all layers intact and then save (note image is 400% resized after conversion:





Put it simple, do not every convert to 8bits if you have layers and want the data intact. Save in 16bit or suffer the loss of fidelity.



kkamin said:


> eric-holmes said:
> 
> 
> > Why save as a .tiff as opposed to a .psd?
> ...



1. Not sure how relevant this is now. Adobe owns the rights to the TIFF file format. The only benefit is that it's a completely open interchange format. Though from what I remember PSD is fairly open too. 

2. Yes TIFF is not only completely open file format, but it's much more than that. It's a complete container for information. For instance you could store a JPEG file within a TIFF file. According to wikipedia TIFF is structured with data tags, and people are free to add tags and software is free to ignore tags that it doesn't understand. As far as I know a TIFF file has all relevant layer info. Even smart layers work just fine. I'd be interested to see if there's anything that a PSD can do that TIFF can't.

3. Yes and no. You make an image with smart layers and what not but open it in Photoshop 7.0 the image would look different. It would still open but look different since the layers won't be recognised.


----------

