View Full Version : JPEG RAW TIFF question
timmyquest
27th of May 2004 (Thu), 14:53
Whenever i am happy with a photo that was shot in raw i save it as a TIFF for (i think) obvioius reasons.
But what aobut when i'm shooting JPEG, is it best to save that as a TIFF or does saving it as a jpg in photoshop compress it yet more?
maderito
27th of May 2004 (Thu), 15:02
Whenever i am happy with a photo that was shot in raw i save it as a TIFF for (i think) obvioius reasons.
But what aobut when i'm shooting JPEG, is it best to save that as a TIFF or does saving it as a jpg in photoshop compress it yet more?
TIFF is a lossless image format. What you save is what you'll get back when you re-open to file.
JPEG is a "lossy" format. So you don't usually get back what you save - and obviously don't if you compress the file significantly.
We've had some long posts on this forum claiming to show that you can re-save JPEGs without data loss. I'll exit here before that debate starts up again. :)
Scottes
27th of May 2004 (Thu), 15:24
More importantly, TIFF can be 16-bit. Things like levels adjustment and color adjustment and such are better done in 16-bit space.
Sure you can convert a file to 16-bit before doing that stuff, but it sure is nice to save it in 16 bit in case you want to make changes.
Working and saving 16-bit images is one of the many things you can do to make your images look better. Each one on their own might not make much difference in the long run - but when you make a measly 2% improvement on each of 6 or 8 different processing steps, well, that adds up to a hell of a difference in the final product.
CyberDyneSystems
27th of May 2004 (Thu), 19:17
... no tmuch pint in saving a jpeg as 16 bit tiff though.. :? As a jpeg it's all ready thrown out so much clor data that it just seems pointles.. noit to mention that by doing so you'll end up with a file about 4 times larger than a RAW file would have been .. :shock: :shock: :shock:
Scottes
27th of May 2004 (Thu), 20:28
... no tmuch pint in saving a jpeg as 16 bit tiff though..
Well I thought otherwise, so I ran a test.
I opened an 8-bit sRGB JPG as shot from the camera and prepped it by doing Levels, Curves, Shadow/Highlight and Hue/Saturation, recording all this as an action. None of the steps were extreme in the very least - just normal editing to touch it up. I then saved it as an 8-bit TIF.
I re-opened the original, converted it to AdobeRGB, and then to 16-bit. I then ran the action and saved it as a 16-bit TIFF.
I re-opened the original again, converted it to AdobeRGB, and to 16-bit. I then ran the action and save it as an 8-bit TIFF.
I opened all 4 images in Paint Shop Pro which has a neat "Count Colors Used" function. The number of unique colors in each was (rounded):
Original 8-bit JPG: 51,000
Work/Save 8-Bit: 125,000
Work/Save 16-Bit: 173,000
--Working in 16-bit yielded 30% more colors
Work 16, Save 8: 182,000
--Saving 8-bit yielded 5% more colors
This tells me that it's a MUST to work in 16-bit space, but I may very well save everything as 8-bit to save the space. This example even had more colors.
Since I'm a pixel-peeper (pixel counter?), I did the test again but this time using a 16-bit image developed in Capture One. Everything was done in AdobeRGB since C1 outputs this. The actions were the same, but I re-recorded it for that image. Again, I was trying to develop the image, not just run stuff on it.
As an extra step I opened the 16-bit and immediately converted to 8-bit and saved. Just to see.
And THEN I developed it 8-bit, tried working in both 8- and 16-bit, and saved as 8-bit.
Number of unique colors in this test:
Developed 16-bit TIFF: 254,000
Work 16 Save 16: 319,000
Work 16, Save 8: 320,000
--No difference here.
Developed 16-bit, Saved 8-Bit TIFF: 253,000
Work 8, Save 8: 238,000
--Working in 16-bit yielded 6% more colors.
Developed 8-bit: 273,000
--Developing 8-bit actually has 9% more colors... Hmmm.
Worked 8-bit, Saved 8-bit: 250,000
Worked 16-bit, Saved 8-bit: 336,000
--Working in 16-bit yielded 34% more colors!
Are you still with me? If so, you're as bad as I am! :)
So, what does all this tell me? ALWAYS work in 16-bit, but go ahead and save in 8-bit. Every time the image is processed as an 8-bit file the number of unique colors is reduced.
My head hurts. I'm not sure if this is even valid. Does Photoshop posterization and stretch the number of colors and is this a bad thing? Stupidly, I didn't even try to figure out which image *looked* better, and I've already deleted them! Argh! Isn't that the true test? Will you even notice the differences, expecially looking at a 6-megapixel image on a 1.2 megapixel screen? Can the human eye tell the difference between two images containing 250,000 and 320,000 colors?
Maybe tomorrow night I'll actually *look* at the images and see if there's a difference. Right now my head hurts and I may have wasted an hour when I should have been developing images....
maderito
28th of May 2004 (Fri), 07:18
Scottes,
Photoshop adds noise (or dithers) when converting from 16 to 8 bit mode in order to avoid quantization artifacts (like banding). The noise is added to the LSB of the 8 bit file. This would increase the number of apparent colors but arguably improves the image quality. I presume PSP does the same.
In Photoshop you can disable by unchecking "dither" in the ACE conversion options in color settings.
I don't have PSP with its facility to count colors. Since you do, you might repeat some of your experiments. I'd be interested in the data and your visual impressions.
BTW - we appreciate your efforts to raise the art of pixel peeping to even higher levels. :)
CyberDyneSystems
28th of May 2004 (Fri), 07:18
O-kay.. I see your point Scott.. and have to agree with your science! :)
I guess my objection was more at the other end of things..
Let's turn it around the other way.. ie: if there is going to be a 16bit tiff involved at 24-32MB filesize.. then I would strongly suggest .. urge .. starting with a 6-8MB RAW file as opposed to the 2MB Jpeg.. :)
But .. if you are "stuck" with a high quality jpeg to start with and the goal is to get as much quality and color info out of it as possible... then I think your methodology is indeed the way to go...
You can understand though, my gut reaction?.. it is just "sooo wrong.." :mrgreen:
Scottes
28th of May 2004 (Fri), 07:40
Maderito,
Your explanation of the dithering process makes a hell of a lot of sense and explains the extra colors. I don't necessarily consider that "better" if the image will be processed again, but it will make it look better as an 8-bit image. (BTW, I made no changes in PSP, just counted colors.)
CDS,
Yeah, your gut reaction is logical. Science defeats logic once again! (Well, not yet, really, but I couldn't resist.)
I *heartily* agree with starting with a RAW image. Looking at things like this test makes me wonder why people would even think about using JPG. (But that's coming from a pixel-peeper/counter who's not looking to start an argument...)
But if you do start with a JPG, then IMHO you must do everything possible to get the most out of the image. Working in 16-bit is paramount.
I'll do some more tests tonight if I get a chance. My thoughts say that they're not necessary - work in 16-bit, period. But I'm intrigued by the thought of developing and saving 8-bit - will there be much of a difference?
But then again, if there is even a barely discernible difference, then I will take the better method. This simply follows my mantra of late: If you can make a measly 2% improvement in every step of processing then you will get a much better final image.
You know, a better test would be to take an image and process it twice - once using average methods, and again using the better methods. Is there much of a difference between one-step and multi-step resizing? Is there much of a difference between fixing contrast using Levels Adjustments or Curves? Is there a difference between working 8-bit or 16-bit? Plain USM versus LAB USM?
It could very well be that each of those methods yields very similar results to the other. But I'm willing to bet that the final result will be much different.
dn7elson
28th of May 2004 (Fri), 07:44
I opened all 4 images in Paint Shop Pro which has a neat "Count Colors Used" function. The number of unique colors in each was (rounded):
Original 8-bit JPG: 51,000
Work/Save 8-Bit: 125,000
Work/Save 16-Bit: 173,000
--Working in 16-bit yielded 30% more colors
Work 16, Save 8: 182,000
--Saving 8-bit yielded 5% more colors
If the original 8-bit JPG had only 51,000 unique colors, that is all there is in that image. By doing the conversion, you are adding "additional colors" by software interpolation, not terribly different than scanners used to do when moving from optical resolution to software interpolation.
If the program is smart enough, it can do a good guess at what "might" have been in the original image before compression, but it is a guess nonetheless. As was said above, high numbers of unique colors can be as much a function of image noise as image detail.
However, I would agree that saving as a TIFF (whether 16-bit or 8-bit), even from a JPG is meaningful. It allows you to have a lossless base point from which to do digital postprocessing without further loss of image quality. RAW would be better, as it starts with much more image data, but there is no sense in losing what you've got, so a lossless compression would seem to be in order.
meow
29th of May 2004 (Sat), 02:50
Scottes, since PSP doesn't support 16 bit I have a feeling the working copy is converted to 8 bit as soon as it's opened. I don't know, but I don't see how it could work any other way. :?:
Scottes
29th of May 2004 (Sat), 03:59
Scottes, since PSP doesn't support 16 bit I have a feeling the working copy is converted to 8 bit as soon as it's opened. I don't know, but I don't see how it could work any other way. :?:
Holy Cow, I *totally* spaced on that!! You are absolutely correct. It had no problem opening the images so I didn't even think of that.
That, of course, totally invalidates all those comparisons. AARRGGHH!!
Man, do I wish that Photoshop had that "count unique colors" feature. I always liked that about PSP.
meow
29th of May 2004 (Sat), 04:24
I have the software to do it but I don't have the resources. Counting colors in a large 48 bit freezes my puter or at least takes longer than I want to stare at the screen. :P
I did it for a smaller crop (about 800*700 pixels).
48 bit 650878 colors
converted to 24 bit 209852 color
converted back to 48 bit 209852 colors
Destroyed the 24 bit image with a crazy curve 97541 colors
Applied the same curve to the 24-to-48 image 209599 colors
Converted the resulting image to 24 bit 97470 colors
Same curve applied to the original 48 bit 6478181 colors
meow
29th of May 2004 (Sat), 04:37
Oh crap. I just realize I should have started with a JPG. :?
Scottes
29th of May 2004 (Sat), 07:07
Oh crap. I just realize I should have started with a JPG. :?
Not necessarily. Those numbers do prove that working in 16-bit is definitely the way to go.
By the way, I'm glad you had that program. I was just about to write it and wasn't looking forward to it. What is it?
meow
29th of May 2004 (Sat), 07:19
I'm not convinced. :P
It's a 16 bit editor.
http://www.dl-c.com/
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.