Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

What's the difference between RAW and JPG image formats?

Question:

I am new to this digital photography. What are “RAW” and “JPEG”? What’s the
difference? What do they do? When do you use them? Where do you find them?

The best analogy that I’ve seen compares RAW format to old-style photographic
film negatives. They’re never something that you want to look at directly, but if
properly processed, they can be used to produce the image formats that you’re more
commonly used to seeing.

Formats like jpeg (aka jpg).

I’ll look at both in a little more detail, discuss what I do, and then
suggest a course of action.

]]>

RAW format

35mm Film Negatives

First, we need to clear something up: there’s no single RAW file format. There are probably hundreds of different formats that all might end up being called RAW.

In short, RAW format captures the raw, unprocessed data from your digital camera. And by raw and unprocessed, I mean the data captured by the photo sensors in your particular model of camera – and as it turns out, those might not even be in what we consider as a standard “pixel” form yet.

As each camera’s technology is different, so too is the data that it might save into a RAW formatted file. Different camera use different sensors which capture light and color in different ways. The RAW format records that data in as close to its original form as possible. But that means that what appears to be a single “raw” formatted file could still be unique to any of the hundreds of different camera makes and models that there might be.

RAW format is not typically compressed, but even when it is, it typically is a larger format due to the fact that is simply contains much more data about the image.

JPEG format

JPEG, or often just jpg (still pronounced “jay-peg”), is a standard file format that contains an encoded and compressed image.

JPEG itself stands for the Joint Photographic Experts Group, which created the specification for this standard format.

JPEG is what’s called a “lossy” format. It uses the characteristics of the human eye, as well as the characteristics of photographs to actually remove some clarity from the image in order to achieve its compression.

Because conversion to .jpg format actually reduces the quality or “fidelity” of the image, it’s not appropriate for all situations, but it is particularly adept at providing a very high degree of compression on photographs before the effect becomes noticeable by most people.

JPEG format has become a defacto standard for digital images and photographs, and can be produced by almost all digital cameras, manipulated by almost all digital imaging software, and can be read and displayed on nearly all computers.

RAW versus JPEG

“If you’re a casual photographer, JPEG’s probably just fine.”

If JPEG is so ubiquitous and (apparently) “good enough” that most people would never notice, why would we ever want to save in anything else?

Two reasons come to mind:

  • To at least save and archive photographs in the highest fidelity and in a form as close to its original as possible. Somewhat like saving your old photograph’s negatives.

  • To be able to manipulate aspects of the photograph that can only best be manipulated in raw form. Somewhat like adjusting the image when making a print from that negative.

That last point deserves a little more discussion, as it’s perhaps the most important to those who care.

For example, a RAW image format might save information that captures the camera’s exposure setting at the time that the photo was taken. Additional RAW data within the image than might allow you to (within limits) actually manipulate the effective exposure as it’s processed – perhaps correcting for an under- or over-exposed photograph. While the same effect can be simulated somewhat by playing with brightness and contrast on a processed photo such as a .jpg, the quality of the result is typically significantly better if the operation can be performed on the raw image.

Which should you use?

If you’re a casual photographer, JPEG’s probably just fine. The pictures that you take can be immediately shared with anyone and viewed anywhere without any additional work on your part.

On the other hand, if you’re a photo buff planning to tweak your photos in programs like Lightroom or Photoshop, or if you just want to archive the highest possible quality image, then raw might be the appropriate choice. Do realize however that unless your camera can save in both RAW and JPEG at the same time (some do), that you’ll need to process your RAW files into JPEGs in order to share them with others. That, in turn, will require software that understands the RAW format used by your camera.

What do I do?

I’ve dabbled in photography for years – longer than computing, actually. So I’m definitely the kind of person who wants to be able to not only save those images in the highest quality possible, but I play with ’em before I post ’em. I’ll adjust color and exposure and crop and whatnot – much like I did back in my darkroom days.

So I have my camera save all my photographs in RAW format.

It’s so much less messy than that old darkroom.

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

14 comments on “What's the difference between RAW and JPG image formats?”

  1. Most good cameras can save both a RAW and JPG version of an image. That is what I do. JPG for immediate sharing and RAW if correction is needed. Having the RAW file has saved my butt a few times.

    Reply
  2. I have noticed subtle differences in certain file types.
    Working on leaflets and flyers, I have noticed that trying to edit JPG files can be a nightmare (especially if you are trying to change a ‘background’ colour) but PNG files are a lot easier – and still a lot smaller that RAW.

    Reply
  3. I think that a better analogy for the comparison is that RAW files are like unmixed master tapes of music and JPG files are like a recording via a phone call of the music or a radio station.

    JPG saves space by discarding some of the information in the photo. How much it throws out can be set by the program creating it and is sometimes adjustable by the user. The less quality you want, the smaller file size you get.

    Most cameras are set to an estimated point where the picture quality is still “acceptable” but the file size is “small enough”. This is similar to an FM radio station. They have to reduce the dynamic range and the frequency range of the music to fit it over the airwaves but good enough that most people are very happy with it.

    Many software programs allow the user to get much smaller files by reducing the quality to where the losses are very noticeable.

    The RAW file is the picture with absolutely no losses or limitations (other than the camera’s) in resolution or range of light values.
    It is not suitable for viewing with most programs because of the file size and lack of standardization but you can use it to recreate any photo that is adjusted to show different parts better.

    Reply
  4. Greetings Leo,

    Thanks for your technical tips. I thought I’d contribute from my area of expertise.

    I’m the complete opposite of a casual photographer. I’m a full-time photojournalist working across a number of titles for Australia’s largest magazine publisher and for other titles outside that organization. On average, I shoot about every second day. The production standards at this company are as high as any in the world, yet I save directly in JPG format.

    There was a brief time, years ago, when the company insisted that all work was to be submitted in RAW format. We even had company funded training to explain why it was better and why we had to do it. However, everyone gave up after a while. It was just too difficult (mainly because of technical limitations at the time) and in the end, it doesn’t matter. Quality, well shot JPGs are absolutely fine for the production stream.

    There’s no doubt that RAW retains all the information and that it’s superior to JPG, but in practice it rarely makes any difference. About the only time I’ll switch to RAW is when I know I’m going to have to make major alterations because I can’t get something in the camera. But that’s so rare it’s almost non-existent. In fact, I don’t think I’ve shot a RAW for years.

    Actually, I remember in the past I had a couple of customers who figured they knew it all and insisted that only RAW was good enough for them. I used to shoot JPGs and then convert just the shots I submitted to them to RAW. They’d coo about the quality and congratulate themselves for insisting on RAW and then give me more work.

    As far as retouching is concerned, I should point out that I do it extensively (on the days I’m not shooting) and often remove or replace backgrounds. I’m pretty good at it. Indeed, in the early days of digital the company insisted that photographers weren’t allowed to retouch their own work because they weren’t able to do it to the required standards. I’m told I was the only photographer permitted to do it at that time. (I’d had quite a bit of retouching experience with transparencies and prints in my own darkroom in the days before digital.) I can tell you that JPG files can easily be retouched to the highest standards, provided vital information hasn’t been lost. But it rarely is in a technically acceptable image.

    It’s worth noting that photo editing programs have percentage settings for JPG quality. I always make sure that any I use are set to a default quality of 100%. This minimizes or eliminates losses during subsequent ‘saves’.

    To be clear, I’m not saying RAW files aren’t necessary for anyone. I’m simply saying that for images in high quality, glossy magazines in sizes up to double page spreads in super-sized formats, good JPGs are fine.

    So, there’s my two cents worth on the subject.

    PS: While I don’t miss the mess and fuss of the traditional darkroom, and the hours/days I used to spend in one, I really do miss the pungent smells of most darkroom chemicals. Weird, huh?

    Reply
  5. Short of better SLR’s, RAW is rarely available. I too began in the darkroom having built my own enlarger at age 13 (58 years ago). Most under $200 cameras are JPEG only & do not offer %compression options. I’m looking for an editor that is easy to use… crop & resize mostly, but also tweak colors & background. (Only requirement is that it needs to be free or VERY inexpensive).
    By the way, I bought your ‘Windows XP’ book & it is EXCELLENT!
    What do you suggest for a photo editor?
    Bill B.

    Subsequent comments have some other suggestions, but what I use doesn’t meet your “needs to be cheap” criteria: PhotoShop.

    Leo
    25-Oct-2011
    Reply
  6. No mention of .BMPs ???

    I usually use .BMP, and then convert another copy to .JPG for distribution, printing, web-pages, etc.. I use a copy of the .BMP file if I want to do any tweaking.

    Nope. And there are probably 100’s of other image formats I didn’t mention either. Smile – BMPs are “OK”, but typically uncompressed and don’t retain all the same information that a raw file would. BMPs are less portable (originally a Windows-only format), cameras don’t generate them (the genesis of this question) and, to be honest, I just don’t see advantage using them.

    Leo
    26-Oct-2011
    Reply
  7. Here’s a philosophical point. I’m proficient in CS5, which my wife didn’t think was real photography. One of my professional photo friends asked her if she like Ansel Adams. He explained that Adams was an average photographer, who employed others to take what turned into many of his celebrated photos, but he was a genius in the darkroom. If it comes closer to the objective of the photo, why not digital enhancement?

    Reply
  8. With concern to the Q Raw Vs. jpg, I want to add two very important issues. 1) RAW has very much wider Color Space as represented on a 3 axis (x,y,z) chart in some cases wider than human eye sight. 2) RAW is the only format legally accepted in a court (for serious cases). Why ? Because you cannot modify it using PS ar any other editing program and save it again as a new RAW. RAW is only produce “in camera” and that is of very much importance.
    Leo please “translate” this to a better english that mine and share with anybody.
    Rodolfo Rodriguez. Electronic Eng. & Pro Photographer

    Reply
  9. Thanks Leo and Rodulf Rodriguez for excellent info.

    I settled for Serif Photo Plus for the final price of $26 US. Serif has been around since my Apple 2C and does not have intrusive DRM licensing like Corel. I think you can legally instal it on more than one computer.

    Download the trial and wait until they send you an offer for half price.

    Until a camera matches the human eye and brain then we will always need to manipulate and tweak.

    Reply
  10. Actually, you can open a JPG, edit it in whatever you like, save it as a JPG once again, open it in Capture NX2 and then save it as an NEF file – Nikon’s version of RAW. In fact, NEF is the default filetype for saving in Capture NX2. I only shoot with Nikons so that’s the only brand I know but I assume (perhaps incorrectly) that this can also be done with software from other camera manufacturers?

    I understand that the result of creating a RAW file like this is not the same as obtaining a RAW file (NEF) directly from the camera. Once the file is saved as a JPG (in the camera) the extra data that would have been in an NEF file is gone, forever. Subsequently saving a JPG as an NEF file in software doesn’t restore the lost data; that can’t be done. It does, however, create a new NEF file. What I don’t know is if (apart from the lost data) an NEF file created from a JPG in Capture NX2 software is exactly the same sort of NEF file created in a Nikon camera. Does anyone else know? Do you know, Leo?

    Probably not, but more importantly it would be obvious with a close look at the pixel data that the image had originated as a .jpg. (When you look VERY closely jpg compression is visible, and converting to NEF would preserve every pixel, including the visual results of that compression.)

    Leo
    26-Oct-2011
    Reply
  11. question: can anyone tell me how many raw shots can I get on 4 gb sdhd card?

    Depends on the specific camera and the resolution you’re shooting at. Take a few in RAW, look at how big they are and then simply divide 4 gig by that (average) number for an estimate. Best you’ll get is an estimate, by the way, since it also can depend on exactly what the pictures are of.

    Leo
    28-Oct-2011
    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.