JPEG is an image file format recognized internationally by cellphones, computers, and other devices.
RAW is an image file format that is sometimes called a digital negative because it is relatively unprocessed. It is proprietary to each camera manufacturer and in contrast to JPEGs, RAW files are not recognized by cellphones, computers etc.
All digital cameras produce RAW files, but many digital cameras – particularly small point-and-shoot cameras – do not allow the user to download the RAW files from the camera.
Instead, the camera processes the RAW files into JPEGs internally, and only the JPEGs can be downloaded or extracted from the camera.
JPEGs can be produced from a number of file formats, not just RAW files. Whichever file format they start with, in the process of saving the files as JPEGs they discard pixels that are identical to others.
The software makes a note of where the discarded pixels are and rebuilds the file when it is re-opened.
JPEGs can be saved with finer or coarser compression. The coarser the compression, the less discrimination the file uses when it discards pixels, and the smaller the size of the compressed file.
Most if not all digital single lens reflex cameras (dSLRs) however, do offer the option to download the digital negative from the camera. A number of compact cameras also allow the user to download the RAW files.
The RAW files can then be processed using an external RAW conversion program.
There are several such programs on the market, including some free ones. Nikon and Canon for example, make programs for use with their own proprietary RAW files.
Photoshop™ is a RAW conversion software program. Photoshop does other thing as well, of course, but at its heart it is a RAW conversion program. It can convert the RAW images to a number of formats, including Photoshop documents (PSDs) and JPEGs.
Why do photographers bother with RAW files when they can get the jpegs straight out of the camera?
The reason is that the color palette of RAW files is finer that that of JPEGs. That is, it has finer gradations or transitions of tone and color. This gives photographers more leeway to make changes to the image.
The JPEG algorithm cannot discriminate such fine gradations of color, so in the process of compressing and saving the files, it discards some pixels that are subtly different from the ones it keeps.
Altering JPEGs can lead to posterization, which is what happens when the color loses its smooth tonal transitions and breaks up into bands of color. It does this because the intermediate colors are lost in the process of altering the image.
Why would photographers want to alter images? Well there are many reasons, but one common one is so they can adjust the exposure after the event.
That is sometimes necessary or desirable because the photographer or the camera doesn’t always get the exposure right.
Adjusting exposure to brighten up the RAW file in Photoshop or some other imaging editor is likely to produce a better final image than trying to do the same thing to a JPEG.
On the other hand, if the photographer can get the exposure right in the camera, he or she can let the camera convert the RAW file with its own internal RAW processor, and have a JPEG ready to use.
I almost always shoot RAW because I like to be able to correct my mistakes work with the original digital negatives.
This past weekend however, I used a new camera, a Nikon D700, for the first time. One of the options the camera offers is to shoot a RAW image and a fine quality JPEG simultaneously.
And that gave me the opportunity to see whether there was any difference between a JPEG straight out of the camera and a JPEG from a converted RAW file.
I didn’t alter or sharpen either image, so there was no question of the JPEG being degraded by processing.
Here is the full frame of the converted RAW file. And below it are two crops from the full frame. The first is a crop from a converted RAW file and the second is a crop of a JPEG straight from the camera.
Can you see a difference in the quality? Is one sharper than the other? Is the color of one better than the other?
What do you think?
Cheviot Sheep
Jpeg from RAW file
Jpeg from Camera
The full-frame image is one of a series from the Masham Sheep Fair 2009 article.
If you enjoyed this article, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to you. You can also send one of our free ecards.




{ 26 comments… read them below or add one }
There is clear evidence the JPEG obtained from Raw conversion has better sharpness & colors.
Glad you think so – the evidence is clear, as you say.
Most definitely – I shoot entirely in RAW myself.
About the only difference I notice is that the RAW image is a bit sharper, perhaps lighter, as seen in the white area of the fur. In that case, I would prefer to work withe the RAW image. Thanks for demystifying this subject for me. I would think most photographers would prefer their images in the RAW. I would.
Does shooting in RAW take up more space on the disk or use more battery power? In other words, I can’t figure out why someone would shoot in jpeg rather than shooting in RAW all the time.
RAW files are a lot bigger than JPEG files.
Yes, that is one of the main attractions of jpegs, if not the main attraction.
Great post David!
I use the Nikon D90, and it also allows me to shoot Jpeg and RAW versions at the same time, which I have been doing quite religiously.
To be honest, I have not been processing and using the RAW images most of the time,but I have been keeping a stock of RAW files nonetheless, in case I need them for a much finer quality image. For the very reasons you noted here. For the purpose of sharing images online (esp on my blog), I do find using finer Jpegs straight from the camera much more convenient (for the little time and space they consume).
The difference in RAW converted to Jpeg and Jpeg straight from the camera, is so very obvious here! The sharpness, detail, color gradations are all packed with much more information in the RAW version. Needless to say, I definitely like the RAW version better. Not just because RAW would allow me to post-process better, but also because the RAW image is so much closer to what our eye actually sees and registers while taking an image. And that is the whole point of capturing an image, right?!
More about the various compressions of Jpegs available straight from the camera: I get to choose, Standard, Normal, Large/fine Jpegs. Here, I have chosen to shoot only Large/Fine Jpegs (along with Raw). I have not compared these Jpeg versions until now, and I do wonder if these too will show a big variance on the computer screen, apart from the difference in space they take up on my hard disk. Other than that, I am quite sure that a marked difference will be quite evident in blown up prints.
I normally convert to full size jpeg at 100%. The I save for web at around 41%, which is about right for the balance between file size and preserving detail in a 500 pixel wide image.
Maybe if I started with a coarser jpeg the trade off would be that I would have to save for web at more than 41% in order to maintain quality.
Good pointer- I will definitely try that to see where a 40-50% RAW to JPEG compression leads me to, as opposed to using a large JPEG straight from the camera.
Would you really need compression if you were starting off from a Jpeg? What’s the image size you generally aim to use on the web?
I aim for a file size of around 40KB or less for an image that is 500×333 pixels.
Ah, I see. I have been using bigger Jpeg file sizes, and of course it’s been a pain. Thanks, I definitely have to look into instilling RAW to Jpeg conversion in my regular web work-flow. Getting greater compression will be a great added benefit.
I just had a look at a couple of your files and I can see they are around 128KB for images that are about 600×400 pixels. You can probably halve that or more and not see any difference on screen.
I’d be interested to know how you get on.
Does the colour space make a difference? Did you use sRGB or Adobe 98 colourspace? I’m very confused about that. Also, when you shoot both fineJPEG and RAW, how are they stored and accessed? Thank you so much for any information you can share.
I shoot with the D700, and have always used the fine JPEG. I’m ready to go up to the next level. Thanks again
Good question and not everyone agrees on the answer.
Jpeg is a universal format that more or less all devices can read. You don’t have to process the image when you shoot jpeg, as you know. You can process a jpeg if you want, but you don’t have to. Your computer can read jpeg and so can the WEB.
RAW images are different. They have to be processed and for that you need a converter. Photoshop is the best known image editor and RAW converter. It can convert RAW files to jpeg, TIF, and of course to Photoshop documents (PSDs).
The conventional wisdom is that if you are gong to work on a RAW image in Photoshop or one of the other image editors, then it is better to work in one of the larger color spaces like Adobe or Profoto RGB.
I don’t do that. My camera is set to sRGB and that is the color space I use in Photoshop.
I do that because most of what I shoot is for the internet, and everything on the internet is in sRGB.
If I want to get a photo printed, I get it done at a consumer outlet such as Boots (in the UK). The equivalent in the U.S. would be Walmart – and they use sRGB in their machines.
So I start with the color space that everything is going to finish up as in the end anyway.
The only other color space I use is CMYK. I change the profile in Photoshop when I am going to get something printed – I mean printed like in a magazine – because they print with the CMYK color space.
The bottom line is that I don’t think I lose anything by starting in sRGB in the camera as opposed to starting one of the other color spaces.
One thing to remember is that if you decide to use Adobe 98 color space and you are going to get prints made at a consumer outlet, then you will want to change the profile of your image to sRGB before you take your CD in for printing.
If you don’t do that then you may or may not see a problem on your monitor. You are pretty certain to see a problem with the prints when you pick them up though, because it’s pretty certain they will look washed out.
Hi David
Thanks for the info, But I can’t understand why the jpeg from the raw file should be better when all you have done is what the camera would have done if you had shot in jpeg to start with ie the camera would take it in raw and change to a jpeg.
Hi John,
Thank you for the question. The answer is that some image editors do a better job than the camera at converting RAW files to jpegs.
Maybe a more accurate answer is that with an image editor I can decide exactly how much sharpening and what kind of sharpening I want to apply to the RAW image. The same goes for other parameters such as noise reduction, exposure changes, response curve, etc.
The camera, however, only offers a limited range of options – and sharpening is usually fixed.
Hi David,
Thanks for the answer.
John
i used to only shoot in RAW, but just recently i noticed that RAW produces incorrect color for some esoteric reasons (see to link below for a comparision):
khanhnahk
in the link above, the photo on the left is a RAW copy, unedited; the photo on the right is a JPEG copy from the camera, unedited (same shot, NEF+JPEG).
Being the one who took the photo shown above, I can attest that the JPEG version contains the accurate rendition of the color of the flower. The RAW version shows a totally incorrect color. Beats me.
The D700 reviews the RAW version, not the JPEG version, so what you see on your camera screen is not what it really is. My verdict at this point is RAW is bad.
The first thing to check is your white balance setting. If you are using automatic white balance and you have moved the hue setting, then you will get incorrect color from RAW. It is quite easy to move the hue setting by accident.
Are you using automatic white balance? Assuming so, then if that isn’t the reason, then try shooting something with a grey card in the frame. Then set the white balance in Camera Raw in Photoshop or whatever program you use. Do this by putting the dropper on the grey card or white card. If that improves the shot then it may be that the camera just can’t set an accurate automatic white balance with the particular lighting conditions.
Let me know what results you get.
The first thing I checked after detecting the color issue was white balancing. It was at automatic when the shot was taken.
The hue setting was at the center (which produced the incorrect color). I moved it to eight different positions in the four different quardrants then took a test photo at each setting, still no good. I then switched to the temperature white balancing, cycling through the temperatures from 3500K to 5000K, results were still bad.
I then moved to a different spot and took a different photo, still not good, color rendition was out of wack on the RAW. the statement that “that the camera just can’t set an accurate automatic white balance with the particular lighting conditions” is not correct. the JPEG version of the same shot does produce correct color. My point is that RAW doesn’t automatically mean GOOD.
What color space have you got set? I set mine to sRGB and not to Adobe RGB because I know that most of my stuff is going to be on the web or it is going to be printed with an Eight Bit color space, or it is going to be printed with CMYK from an Eight Bit pdf.
originally it was in sRGB, but for my color-experimental shots i switched back and forth between sRGB and Adobe RGB. color still out of whack for the RAW.
One thing you didn’t mention is whether your monitor is color-corrected? Have you tried looking at the images on someone else’s monitor?
Also, what image editing software do you use?
I think you’re missing the point. The point is that the jpeg version and the RAW version are dissimiliar (the jpeg version being the one with the correct rendition of the color). If both the jpeg and the RAW are incorrect in producing the colors, then of course we’d look at the monitor.
If you’re suggesting that the monitor responds differently to jpeg and RAW, ergo the cause for the color mismatch, then that’s a totally different subject, one of which I’ve never heard of before.
If the original image is Adobe RGB and you convert it to a JPEG so that it can be viewed on screen, then the colors will change. The Adobe RGB colors will look flat and washed out.
{ 2 trackbacks }