Forgot Password
Pentax Camera Forums Home

Show Printable Version Search this Thread
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: 28,081
01-07-2009, 02:36 PM   #31
Class A's Avatar

Join Date: Aug 2008
Location: Wellington, New Zealand
Posts: 10,326
Regarding Izumi Taniguchi's comments

QuoteOriginally posted by Pixguru Quote
So I cannot come up with any particular reason to switch to a public, multipurpose format like DNG.
The one good reason to use DNG is to prevent your PEF files becoming unreadable in the future. Even between different camera models, RAW file formats differ and it is unrealistic to expect camera manufacturers and other software vendors to support certain RAW file formats indefinitely. Hence, you may find yourself being unable to read your RAW "negatives" at some point in the future.

The DNG format, on the other hand, is an open standard and a) can easily be supported by anyone and b) can be expected to be supported by Adobe "indefinitely".

Having said that, programs like dcraw contain algorithms that read a lot of RAW (including PEF) formats and I see now reason why one should not be able to use the available source code for dcraw in the future in order to support say PEF files even though the commercial world may longer do it.

QuoteOriginally posted by Pixguru Quote
This means that RAW-format images lack brand originality.
Not quite, since sensors differ and some processing already goes into producing RAW files.
Most importantly, though, the loss of "brand originality" concerns DNG and PEF files in the very same way.

Since Pentax Photo Laboratory supports DNG at least since version 3.61 (thanks Pixguru!), there is no point in using PEF just in order to get the option of SilkyPix "development".

Last edited by Class A; 01-07-2009 at 07:52 PM. Reason: Pixguru pointed out that Photo Laboratory does indeed support DNG from version 3.61
01-07-2009, 05:31 PM   #32
New Member
Pixguru's Avatar

Join Date: Nov 2008
Location: Mississauga, Canada
Photos: Gallery
Posts: 17
The 3.61 version of Laboratory does in fact process DNG files.
01-07-2009, 05:58 PM   #33
Veteran Member
WheresWaldo's Avatar

Join Date: Sep 2006
Location: North Carolina
Photos: Gallery
Posts: 498
QuoteOriginally posted by Izumi Taniguchi Quote
Which RAW suits you better — PEF or DNG?

As a RAW-data file format, PEF files are processed with a certain degree of reversible compression, while DNG files are uncompressed. Because of this, I’m not convinced of the practical usefulness of DNG files at this point.
Only in the Pentax implementation of DNG. DNG supports the same levels of reversible compression as PEF.

QuoteOriginally posted by Izumi Taniguchi Quote
Secondly, most computer operating systems and software applications are designed to accommodate the original RAW-data file formats of major camera manufacturers. So I cannot come up with any particular reason to switch to a public, multipurpose format like DNG. Honestly speaking, even though a few years have passed since the introduction of DNG, it is not as popular as was originally expected, perhaps because of the issues I have mentioned.
There is little evidence to support this claim and it ignores the fact that like anything submitted to any standards organization, such as Adobe has submitted DNG, will garner more support after approval.

QuoteOriginally posted by Izumi Taniguchi Quote
Finally, in terms of visual expression, RAW-format images are not processed by the camera’s imaging engine — the key factor to reproducing the individual touches and renditions of each camera manufacturer. This means that RAW-format images lack brand originality. I suspect that, if you choose the DNG format and process DNG-format images with multipurpose data-processing software, you can no longer make a distinction among the different camera brands.
Wow, I guess in a lack of quantifiable evidence you can just make shite up.

QuoteOriginally posted by Izumi Taniguchi Quote
In this case, data-development software plays a very important role. Because I’m very fond of PENTAX’s visual presentation, I always use PENTAX PHOTO Laboratory, PENTAX’s original RAW-data processing software, to process RAW-format files.
Ok, so he likes SilkyPix better than ACR, others prefer RawTherapee and still others Aperture, I can accept that, but to say that Pentax developed their own raw conversion software is a stretch by anyone's imagination.

QuoteOriginally posted by Izumi Taniguchi Quote
Based on what I have described, I can’t find any particularly compelling reason to choose DNG as a RAW-data file format over a manufacturer-specific format like PEF.
Good for Taniguchisan.

Last edited by WheresWaldo; 01-12-2009 at 02:08 PM. Reason: removed some misleading wording, corrected some spelling errors
01-12-2009, 05:47 AM   #34
Veteran Member

Join Date: Mar 2008
Location: Durban, South Africa
Photos: Gallery
Posts: 1,052
I have been a jpeg shooter for eons and always found the raw (pef) processing a pain.

Well now I found a great little product which converts dng to HQ Jpegs or tiffs.

Its free and also has a nifty fast interface and the quality of the final pic definately has a better colour tonality & sharpness than shooting straight jpeg.

So know I just use Stepoks DNG convertor and shoot 90% dng.



01-15-2009, 04:00 AM   #35
Inactive Account

Join Date: Nov 2008
Location: Geelong, Victoria, Australia
Posts: 33
Ahhh- Now that clears the mud! Thanks Peter.
03-17-2009, 11:53 AM   #36
Senior Member

Join Date: Mar 2009
Photos: Albums
Posts: 113
Thanks for the tip about Stepoks. Google searched and down-loaded it.

04-14-2009, 01:48 AM   #37
Inactive Account

Join Date: Mar 2009
Location: Malmö, Sweden
Photos: Gallery
Posts: 583
Thank you for a good explanation of JPG vs RAW

QuoteOriginally posted by dylansalt Quote

So know I just use Stepoks DNG convertor and shoot 90% dng.



Thanks for the tip, I googled too and here is the link: - Free Raw Converter and Importer for all cameras
04-28-2009, 03:02 PM   #38
Inactive Account

Join Date: Apr 2009
Location: California
Photos: Albums
Posts: 24

Terrific explanation, Peter. Could you explain the differences and advantages between RAW and TIF, between TIF and JPG?

05-02-2009, 05:49 AM   #39
Class A's Avatar

Join Date: Aug 2008
Location: Wellington, New Zealand
Posts: 10,326
QuoteOriginally posted by Super A Quote
Could you explain the differences and advantages between RAW and TIF, between TIF and JPG?
RAW is a single name for a large number proprietary formats supporting up to 12-bit colour depth.

The TIFF format is standardised and can support up to 32 bit colour depth. It is much more memory hungry than JPEG because there is no lossy compression. TIFF images will therefore not show any compression artefacts and image quality does not deteriorate with each generation of a further save.

Some use TIFF as a vendor independent, standardised format to store their RAW data.
05-09-2009, 11:54 AM   #40
Marc Langille's Avatar

Join Date: Dec 2006
Location: NW Arkansas, USA
Posts: 4,702
Pete, I've posted a new tutorial in this sub-section, which covers the steps needed to recover the whites of a white bird that (as shot) shows warm or yellow tones instead.

This will be a clear example of another benefit of using PEF/DNG formats.

01-12-2013, 04:46 PM   #41
New Member

Join Date: Dec 2012
Posts: 14
QuoteOriginally posted by Class A Quote
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.
Thank you for that article which I have just discovered as a new member. Shame that only one of the images is available.

  • 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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:41 PM. | See also:, 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?
Creating a FREE ACCOUNT takes under a minute, removes ads, and lets you post! [Dismiss]