Forgot Password
Pentax Camera Forums Home
 

Reply
Show Printable Version 3 Likes Search this Thread
2 Likes  #1
Some explaination of RAW vs Jpeg benifits.
Posted By: Peter Zack, 10-30-2008, 01:17 PM

This could get a bit long so I hope it helps some of the shooters that are not sure about the differences and shoot Jpeg to save space and don't see what the fuss is about.

Periodically I've seen questions about the 2 formats (RAW could be PEF or DNG) and someone asked me the real differences. It's not as simple as "you can correct WB better" and that comment does not really explain why WB corrections are better.

Anyone that has Windows Vista for example with have Microsoft Digital editor and the colour adjustment feature has a WB 'eye dropper' to make adjustments. So does the Silkypix software as well as Lightroom and other programs. So you open the Jpeg, find a neutral gray spot in the picture and adjust it. It looks great. No issue right? Well not really if you want to enlarge quite a bit or do some manipulation or heavy cropping to the image.

A RAW image is essentially a digital negative. The camera shoots every image in RAW and then sends it to the buffer where it's either written directly to the card as it was shot or it is converted to a Jpeg (K series) or it could be either a Jpeg or TIFF (*ist series) as well. Several steps happen if the camera is going to convert the file from Raw to another format.

Demosaicing* and white balance, then Tone curves, saturation, sharpening and contrast are performed on the file as it is converted to a Jpeg. These of course depend on the Jpeg settings you have selected. So it is no longer the "negative" as the camera originally shot the image.

*demosaicing (algorithm) This is my simplified definition but a RAW image assigns data for each pixel of the 3 primary colours and is one reason for the larger size of the files. A raw converted to Jpeg (in camera or PC) needs to combine the data using a demosaicing algorithm to assign a single colour value for that pixel.

Raw is an unaltered image without Jpeg processing in camera which changes the image. A RAW image has not gone through the above steps in the process of conversion to a Jpeg image. RAW's just contain one red, one green and one blue value for each pixel in the image. Once that image has been developed to a Jpeg the firmware/processor must make several choices in combining the colour/pixel data. Think of all the data for each pixel is thrown in a blender to create the final Jpeg. Demosaicing takes a large amount of processor power to do.

So when you ask the camera to record a digital image, it of course electronically stores the image on the buffer as a RAW. Then you've set the camera to Jpeg only. So the camera takes that RAW image and converts it using a demosaicing algorithm. To speed up the buffer clearing in the camera, the firmware is designed to make some compromises to reduce processor drain and power needs. We all want 10 Fps and we want it fast. Consider that the camera converts the jpeg and writes to the card faster than Silkypix can do it on an up to date computer with a bigger processor and more memory. How? Compromises. Your PC can't convert at 3Fps. So what you get from a RAW image that was processed in good software on a computer is more resolution, less noise, better small-scale color accuracy and reduced moiré.

Have a look at a RAW image with tight parallel lines that converge to one point* and the same image shot in camera as a Jpeg. You'll see the lines will start to blend together and get that digital "jagged edge" look much more in the Jpeg. it just can not resolve the image as well because every pixel is blended image data.

* A way to do this is a grey asphalt roof. The lower edges of the roof are black tipped and the surface is grey. Shoot from one side and then look at the pictures on the computer. The RAW shows far less digital artifacts as you look down the image toward where the lines come together. You can often see moiré colour patterns in the Jpeg as well.

So consider that you have a Raw file and have a white balance issue. You open it in your software (SilkyPix, Elements, Lightroom etc) and you correct the WB because there is a green shift. The WB correction is done to the green spectrum of the data in that RAW image and now your shot looks great. In a RAW, each pixel is a seperate colour. In a Jpeg each pixel is all colours. To make the correction as accurately it is much tougher and less accurate. This also is true for tonal changes (curves tool) Saturation and other colour based effects as well as eV compensation where you want to brighten or darken the image in the computer.

The same image here is a demonstration of what you could do. This is not using a selective colour masking. Just simply taking the blue channel and increasing or decreasing the saturation in the blue channel only. It's a demonstration of what happens when you try shadow recovery in an image or any other colour or eV adjustment.

In the RAW image adjustment, the image result is fine. If you did this to a Jpeg, you would see tons of dithering in the final image. The image could never be printed large from a Jpeg.

Lets say the sky has some blue colour but is a bit washed out. (for this demonstration the original image was basically good. I enhanced or subtracted from the shots to show what could be done.

The shot below was taken in RAW + so I have both the RAW file and original Jpeg file to work with. Camera settings to default for Jpegs.

So here's the original untouched RAW image converted in Lightroom:



Here's the next adjustment with the blue channel pushed to almost 100% saturation:



Here's the original image with the blue slider pushed to desaturate the blue almost 100%



So if you look at the greens and yellows, they are all the same in each shot. But the blue has changed drastically. The blue sections do not have any artifacts created because those sections were all recorded as blue colour spectrum in the RAW negative. If they were recorded as a Jpeg, there would be marginal reds and greens mixed into the blue. When you push the colours this far, you get little blotchy areas called dithering. It looks awful when printed even if it's passable on a monitor. The yellows may look different in each shot here but our eyes/brain make colour choices based on the entire image and you are looking at small web sized versions. On my computer and quickly switching between images, you can tell the green and yellow is unchanged.

Now to show the difference between a Jpeg and RAW once there have been edits done, I've cropped a part from the RAW and the Jpeg images to show what happens to each. You will also note the drastic differences in the resolution of the flower petals. There was no other processing done and no sharpening added.

Here's the Jpeg version.


Here's the Raw version:


So the RAW file renders the colours separately and thus produces a better resolution and less colour bleeding around the edges of contrast areas.

So which is better? Hard to say. If you are careful with your exposures and framing the subject, plan to do very little adjusting in software or cropping, A Jpeg may be the best way to go. It uses far less computer and camera resources. If not manipulated much the image quality is very good in today's SLR's.

If you want big enlargements, want to crop more than 5-10%, want to be selective with sharpening, do shadow and colour adjusting, then a RAW is the better format.

Last edited by Peter Zack; 10-30-2008 at 04:24 PM.
Views: 30,086
10-30-2008, 01:58 PM   #2
YJD
Veteran Member
YJD's Avatar

Join Date: May 2008
Location: Monte Vista, CO
Posts: 529
Very very very good explanation! I'm sure that will help those looking into DSLR.
10-30-2008, 02:47 PM   #3
Inactive Account




Join Date: Mar 2007
Location: James City County, Virginia
Photos: Gallery
Posts: 322
Well thought out Peter. It seems every time I log onto the forum there is more useful information.
10-30-2008, 03:36 PM   #4
Pentaxian
Moderator Emeritus




Join Date: May 2007
Location: Edmonton Alberta, Canada
Photos: Gallery | Albums
Posts: 10,643
Original Poster
QuoteOriginally posted by YJD Quote
Very very very good explanation! I'm sure that will help those looking into DSLR.
I hope it made sense

QuoteOriginally posted by squarerigger Quote
Well thought out Peter. It seems every time I log onto the forum there is more useful information.
I'm glad you got something from it. I think there are some misconceptions around this and maybe it will help some raise their 'game' a notch or 2.

10-30-2008, 03:58 PM   #5
Veteran Member
Tom S.'s Avatar

Join Date: May 2008
Location: S.E. Michigan
Photos: Albums
Posts: 4,317
Excellent post! Thanks.
10-30-2008, 05:37 PM   #6
Forum Member




Join Date: Oct 2008
Location: France and Germany
Photos: Albums
Posts: 73
Thx a lot, Peter ! I always use RAW, since I do quite a lot of pp, but your explanation helped a lot to explain WHY there is such a difference.
10-31-2008, 04:02 AM   #7
Pentaxian
Moderator Emeritus




Join Date: May 2007
Location: Edmonton Alberta, Canada
Photos: Gallery | Albums
Posts: 10,643
Original Poster
Thanks Tom. Hope it helped a little to clear the muddy water around this issue.

10-31-2008, 05:05 AM   #8
Junior Member
gowerray's Avatar

Join Date: Apr 2008
Location: South Wales UK
Photos: Gallery
Posts: 48
RAW explanation.

An excellent, concise and easily read article. The illustrations really give voice to the explanation. Thanks for sharing it with us.
10-31-2008, 05:38 AM   #9
Veteran Member
dazman's Avatar

Join Date: Jan 2008
Location: Melbourne, Australia
Posts: 1,949
Great post Peter. I'm a RAW shooter and found the info very informative.
10-31-2008, 05:49 AM   #10
Veteran Member
Venturi's Avatar

Join Date: Mar 2008
Location: Tulsa, OK
Photos: Gallery
Posts: 2,636
Nice job, Peter. The explanations you typically see use histograms and color bit depth, etc. which while perfectly valid do tend to glaze the readers' eyeballs I think. Using a photo to illustrate your points as you did here was a good way to make it all tangible.
10-31-2008, 03:31 PM   #11
Pentaxian
Moderator Emeritus




Join Date: May 2007
Location: Edmonton Alberta, Canada
Photos: Gallery | Albums
Posts: 10,643
Original Poster
QuoteOriginally posted by Wulifou Quote
Thx a lot, Peter ! I always use RAW, since I do quite a lot of pp, but your explanation helped a lot to explain WHY there is such a difference.
QuoteOriginally posted by gowerray Quote
An excellent, concise and easily read article. The illustrations really give voice to the explanation. Thanks for sharing it with us.
QuoteOriginally posted by dazman Quote
Great post Peter. I'm a RAW shooter and found the info very informative.
QuoteOriginally posted by Venturi Quote
Nice job, Peter. The explanations you typically see use histograms and color bit depth, etc. which while perfectly valid do tend to glaze the readers' eyeballs I think. Using a photo to illustrate your points as you did here was a good way to make it all tangible.


Thanks everyone. it was spawned by some who asked my how to see the difference. So this method seemed the most effective to get the point across.
We're seeing more and more excellent shooters and personally I think any serious work should be shot as RAW or RAW + (how I shoot) so as PP skills increase and maybe some have a chance to sell work, they can always go back and re-edit a shot to greater effect.

As my first teacher always said "save the negatives in a safe place, they can always be reprinted!"
10-31-2008, 04:48 PM   #12
Senior Member




Join Date: Aug 2008
Location: Marietta, Pennsylvania
Posts: 257
I have a question for Peter or for whoever knows the answer. If I take an image in raw format, then want to use the image for PPG, since PPG will not accept raw images, what is the best method for submitting images to their gallery? Shoot raw, then format the image to tiff, then jpeg?

I usually shoot in jpeg format, but I would like to start shooting in raw format to get better results and to have prints for portfolio purposes.

Any help is appreciated.
10-31-2008, 05:19 PM   #13
Pentaxian
Moderator Emeritus




Join Date: May 2007
Location: Edmonton Alberta, Canada
Photos: Gallery | Albums
Posts: 10,643
Original Poster
I need to know what software you have but the short answer is if you have software that allows you to edit the RAW and save directly as a Jpeg (as long as the RAW is not altered such as how Lightroom works) then that is the best way to do it. If you do not have software that is non destructive to the RAW file, then I would open the image in Silkypix (Pentax Photo lab) and save it as a TIFF. You can make some basic adjustments here like WB etc. Then edit the TIFF in whatever software you have and save as a Jpeg. TIFF"s are better to work on as they are a Lossless format and Jpegs as lossy and degrade more.

I would never edit the RAW directly as those changes can not be undone.
11-01-2008, 02:09 AM - 1 Like   #14
Pentaxian
Class A's Avatar

Join Date: Aug 2008
Location: Wellington, New Zealand
Posts: 11,251
Great posting, Peter.

Just a few comments:
You make a very good point about tone curve, saturation, sharpening and contrast decisions all being embedded into the JPEG. If you overdo, say the sharpening, then it is next to impossible to undo that on a JPEG.

If you use conservative settings for these image parameters though, the main difference between the formats is the dynamic range. A RAW file captures the full sensor range (typically 12-bit) and allows editing within a 16-bit space.

JPEGS use just 8 bit in comparison and that is why you cannot make adjustments (in terms of lifting shadow details or WB correction, for instance) as drastically as with a RAW file. The individual colour channels just start to clip earlier and the steps between the levels are larger.

The artefacts you demonstrated with the JPEG crop seem to be compression artefacts to me. If you chose a higher quality (lower compression rate) these won't look as bad. There is a reason why JPEG files are much smaller than RAW files. Depending on the desired output size, the discrete cosine transform used by JPEGs goes a long way to reduce size without affecting visual quality.

Finally, I think alluding to the processing speeds between camera and PC is not quite fair since I'm 99.5% sure that the camera uses hardware to do the conversion. This is way quicker than using a general purpose PC without necessarily comprimising conversion quality. I have seen RAW->JPEG conversion performed on a PC with a basic but widely used converter that looked much worse than the conversion done by the K100D in camera. In fact, I believe that the in camera conversion should be very close to the one done by the Silkypix powered PhotoLaboraty, if not identical. Has anyone ever looked closely at this?

Hope this contributes to your fine posting.
11-01-2008, 02:49 AM   #15
Pentaxian
Moderator Emeritus




Join Date: May 2007
Location: Edmonton Alberta, Canada
Photos: Gallery | Albums
Posts: 10,643
Original Poster
This is good stuff Class A. I'm by no means an expurt[sic] and hoped that this would spur some discussion and not only help others understanding but my own. The crop though is the highest quality available.

What I did was opened each of the RAW and Jpeg files and moved the blue slider to -100% then saved the files as 16 bit TIFF's from lightroom (lossless). I then used ADobe PS to save the TIFFs to 16 Bit resized Jpegs for the web. The TIFFS look the same as the images you see here.

I hope you and other members with a greater understanding will join in.
Reply

Bookmarks
  • Submit Thread to Facebook Facebook
  • Submit Thread to Twitter Twitter
  • Submit Thread to Digg Digg
Tags - Make this thread easier to find by adding keywords to it!
camera, colour, computer, data, file, image, jpeg, look, pixel, shot

Similar Threads
Thread Thread Starter Forum Replies Last Post
[K10D RAW+]Exposure difference between RAW and JPEG sterretje Pentax DSLR Discussion 9 04-13-2010 02:06 AM
What do you use most Raw or Jpeg Ivo_Spohr Pentax DSLR Discussion 75 04-02-2010 09:04 PM
JPEG, RAW, JPEG + RAW...huh? Raptorman Troubleshooting and Beginner Help 14 12-22-2009 11:49 AM
RAW or jpeg? Leana Troubleshooting and Beginner Help 26 03-01-2009 04:02 AM
RAW + JPEG with JPEG on One Star quality laissezfaire Pentax DSLR Discussion 58 12-10-2008 02:42 PM



All times are GMT -7. The time now is 10:20 PM. | See also: NikonForums.com, CanonForums.com part of our network of photo forums!
  • Red (Default)
  • Green
  • Gray
  • Dark
  • Dark Yellow
  • Dark Blue
  • Old Red
  • Old Green
  • Old Gray
  • Dial-Up Style
Hello! It's great to see you back on the forum! Have you considered joining the community?
register
Creating a FREE ACCOUNT takes under a minute, removes ads, and lets you post! [Dismiss]
Top