Forgot Password
Pentax Camera Forums Home
 

Reply
Show Printable Version 3 Likes Search this Thread
2 Likes  
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,089
11-01-2008, 05:20 AM   #16
Veteran Member
MoiVous's Avatar

Join Date: Sep 2008
Location: Adelaide, South Australia
Photos: Gallery
Posts: 677
Excellent description Peter! Great illustration of the points with the images too.

As ClassA suggest, the JPEG in camera uses hardware processing - the algorithm is implemented electronically in the firmware. Thats also why there is flood of MP3 players and JPEG P&S cameras - the algorithms are implemented in hardware. To do the same thing using software only in a camera would very inefficient and require a small mountain of RAM to do it in the time the camera stores a JPEG.

The other point about JPEG is that as its a lossy form of data compression, repeated processing/saving of an image will result in increased artefact (ie some of the data is lost every time its saved). There is a neat FAQ on the topic you can read (its old but still valid)

There are a several good commentaries on JPEG vs RAW around the net ( RAW vs. JPEG, Roger Clark and for the pure science of JPEG read The Society for Imaging Science & Technology web tutorials) if anyone is interested.

11-01-2008, 06:01 PM   #17
Senior Member




Join Date: Aug 2008
Location: Marietta, Pennsylvania
Posts: 257
Thank you Peter and Class A for your reply. I took some images under the RAW setting PEF and when I tried to upload the images, my computer doesn't recognize the media card. The card is also brand new and I have PS Elements 5 along with Pentax Silky Pix. Help!
11-02-2008, 12:24 AM   #18
Pentaxian
Class A's Avatar

Join Date: Aug 2008
Location: Wellington, New Zealand
Posts: 11,251
Cindy, I suggest that you create a new thread for this issue. Try connecting your camera to your computer with the card still in the camera and see whether that makes a difference. I think I've also seen a thread about how to rescue data from a corrupted card. But as I said, all this should be taken further in a different thread.
11-02-2008, 05:12 AM   #19
Veteran Member
Tom S.'s Avatar

Join Date: May 2008
Location: S.E. Michigan
Photos: Albums
Posts: 4,317
QuoteOriginally posted by cindy s Quote
Thank you Peter and Class A for your reply. I took some images under the RAW setting PEF and when I tried to upload the images, my computer doesn't recognize the media card. The card is also brand new and I have PS Elements 5 along with Pentax Silky Pix. Help!
Chances are your problem is you are trying to read a SDHC card with an older card reader. The card reader has to be able to read SDHC, and your operating system has to have the upgrade needed to read/recognize SDHC cards.

SDHC usb card readers are cheap, infact some brands of cards give them to you when you buy the card. The software patch is offered free by MS for both Vista and XP.

11-02-2008, 05:16 AM   #20
Pentaxian
Moderator Emeritus




Join Date: May 2007
Location: Edmonton Alberta, Canada
Photos: Gallery | Albums
Posts: 10,643
Original Poster
I'll bet that Tom has the coorect answer and ClassA's suggestion should work. Use the camera and cord as your card reader to test it. Then get yourself an SDHC card reader.
11-02-2008, 07:57 AM   #21
Site Supporter
Site Supporter
Marc Langille's Avatar

Join Date: Dec 2006
Location: NW Arkansas, USA
Posts: 4,710
Nicely done Peter

Sometimes examples of the "intangibles" are needed to show folks the advantages of RAW. Of course, I am not implying that it's for everyone!

JPEG (for me) is only for the web, and the final product at Bedfords Camera and Video for printing (their preference, not mine). Generally I can recover more details in RAW in difficult lighting situations. One example that is especially true is white birds in bright sunlight!

Last edited by Marc Langille; 11-02-2008 at 08:29 AM. Reason: clarification
11-03-2008, 06:11 AM   #22
Senior Member




Join Date: Aug 2008
Location: Marietta, Pennsylvania
Posts: 257
Thanks everyone for your suggestions. I finally was able to retrieve the images by going into the Auto Play manually. I also downloaded the media card update in windows. The card isn't an SDHC. Thanks again for your assistance.

11-26-2008, 05:27 PM   #23
Inactive Account




Join Date: Apr 2008
Location: Florida
Posts: 7
Good stuff, Peter! It is really helpful and appreciated. The actual examples made all the difference as opposed to trying to explain it with words alone.
12-07-2008, 11:59 PM   #24
Veteran Member
arbutusq's Avatar

Join Date: Sep 2006
Location: Vancouver BC canada
Photos: Gallery
Posts: 380
QuoteOriginally posted by Peter Zack Quote
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.
They definitely look like jpeg compression artifacts tome, but that also shows the benefit of RAW. Every time you save a Jpeg, even on the highest settings, you introduce artifacts. When you shoot Jpeg in camera you are saving it twice, one in the camera and one more in post processing, so you are introducing more artifacts. With RAW you are only saving as Jpeg once so you get far fewer artifacts.

I think your explanation explains the color shifts in the artifacts though. (Wow I used artifacts a lot in this post, where's the damn thesaurus?)
01-06-2009, 09:48 AM   #25
New Member
Pixguru's Avatar

Join Date: Nov 2008
Location: Mississauga, Canada
Photos: Gallery
Posts: 17
Excellent Job, Peter and well done in Ottawa last night!

What is the difference between the DNG and PEF formats?
Why doesn't Vista display thumbnails of the DNG files or open them in the Photo Gallery? When / why should I shoot in DNG?
I shoot for pleasure and appreciation but not for profit!
01-06-2009, 11:07 AM   #26
Site Supporter
Site Supporter
xs400's Avatar

Join Date: Mar 2007
Location: San Francisco Bay Area
Photos: Gallery
Posts: 2,940
I just finished reading your post. Thanks Peter. This explains a lot. I think I'll now start shooting in RAW.
01-06-2009, 11:48 AM   #27
Pentaxian
Moderator Emeritus




Join Date: May 2007
Location: Edmonton Alberta, Canada
Photos: Gallery | Albums
Posts: 10,643
Original Poster
QuoteOriginally posted by Pixguru Quote
Excellent Job, Peter and well done in Ottawa last night!

What is the difference between the DNG and PEF formats?
Why doesn't Vista display thumbnails of the DNG files or open them in the Photo Gallery? When / why should I shoot in DNG?
I shoot for pleasure and appreciation but not for profit!

Gold once more! The only thing I had to do with that was sitting on the sofa
As for the Vista previews of DNG's I'm not sure. I have both Photoshop and Lightroom and see that the thumbnail previews will pop up when I open the card or the file that the images are stored in but it takes a long time. As PEF's the thumbnail previews open quickly.

The difference between PEF and DNG is very slight as far as I can tell. PEF is compressed a little so the file sizes are about 25% smaller. Once opened and converted (to TIFF"s Jpegs etc. ) there is no quality difference. PEF is native to the Pentax system and DNG is a quasi standard open source and should be readable by other types of software/hardware years down the road. PEF is more Pentax specific.

For sorting purposes, now I shoot RAW + since getting a K20D. The file sizes are large and the previews are too slow to open. So I will transfer the card contents to a file on the computer. Empty the computer's recycle bin. Then separate the Jpegs to another folder to run through (using windows media player) and pick out the best images, deleting the crappy Jpegs as I go. Once done, I Move the good Jpegs that remain back to the first folder where the RAW's are waiting and hit sort by name. The Jpegs and RAW's are side by side again. All the Raw's that have a Jpeg 'mate' are moved to my 'working' folder. Once the good stuff has been moved, I take the Jpegs that were deleted to the recycle bin and put them back with their mates. The crappy RAW's with their Jpegs are moved to my storage hard drive. Only complete disasters are totally deleted.

Sounds cumbersome but it really isn't. I can take 150 images from the camera to computer, sort through them and be ready to edit the good stuff in less than 5 minutes most of the time. Doing things the same way every time keeps me much more organized.
01-06-2009, 12:22 PM   #28
Forum Member
Shaloot!'s Avatar

Join Date: Aug 2008
Location: Raleigh, NC
Posts: 67
Thanks for this post Peter, I spent this morning using the search feature looking for this very post since I am now trying my hand at RAW and remembered reading some useful stuff here.
So I have a dumb question:
I DO NOT do edits to the RAW image? I convert (save as) the raw image either to a TIFF and then work on that image? I thought you make all the changes/edits on the RAW image, then when done save as a jpeg (or TIFF if wanting high quality print) and then the RAW file you can undo all the changes?
Sorry for the basic questions, but I'm only now paying attention to RAW format. If it helps any, I am using aperture 2...
01-06-2009, 06:16 PM   #29
Pentaxian
Moderator Emeritus




Join Date: May 2007
Location: Edmonton Alberta, Canada
Photos: Gallery | Albums
Posts: 10,643
Original Poster
The general rule is the RAW remains untouched. So if you open the RAW file in Adobe PS, then you edit the shot and save it as a TIFF, Jpeg DNG etc. The Raw file remains your negative.

Lightroom is very similar. You edit and then export the file to the file type you've chosen.

I don't have Apeture but my assumption is it works the same way. I'm not aware of any editing software that alters the RAW file. The ones I've used only allow you to save the finished work in some other format. That's the way it should be so you can always go back to the RAW and start over if need be.

There are Freeware programs that don't work with PEF files and with those you would have to use the Pentax software (Silkypix) to convert your files to TIFF"S and then edit the image. But most will work with DNG files.
01-07-2009, 12:01 PM   #30
New Member
Pixguru's Avatar

Join Date: Nov 2008
Location: Mississauga, Canada
Photos: Gallery
Posts: 17
Which RAW suits you better — PEF or DNG?

I found the following note by Izumi Taniguchi in his Photo Technique Workshop seminars posted in the Pentax digiichi website

I have mentioned two different RAW-data file formats: the original format (PEF, for PENTAX) and the Adobe System-advocated DNG format. It’s very understandable that DNG has attracted tremendous attention since its introduction, because it was developed and advocated by Adobe System, the developer and marketer of Photoshop — the de facto standard in the world of photo retouching software.

DNG provides an option to users of digital SLR cameras like the K10D, but I’m frequently asked about which format to choose. I usually answer that they should choose PEF — at least for the time being.

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.

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.

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.

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.

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.

The original comment can be viewed here:
PENTAX digiich
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 05:59 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