JPEG and Raw Image Formats

Dig­i­tal cam­eras save pho­tographs using sev­er­al image file for­mats. The most com­mon image for­mat avail­able on cam­eras is called JPEG. Advanced and inter­change­able lens cam­eras also include a broad cat­e­go­ry of image for­mats col­lec­tive­ly known as raw. There are advan­tages and dis­ad­van­tages to each for­mat that large­ly depend on your spe­cif­ic sit­u­a­tion and intend­ed use. 

What is JPEG?

JPEG is the most com­mon­ly avail­able image file for­mat on dig­i­tal cam­eras and the most wide­spread file for­mat used for dis­play­ing pho­to­graph­ic con­tent online—websites, social media, etc. All mobile devices, email pro­grams, per­son­al com­put­ers, dig­i­tal cam­eras, and print­ers can dis­play JPEG images. When trans­ferred to and opened on a com­put­er for view­ing, JPEG files end in the .jpg or .jpeg file­name exten­sion.

JPEG compression

JPEG’s uni­ver­sal­i­ty is due in part to its flex­i­bil­i­ty in bal­anc­ing image qual­i­ty and file size. JPEG employs a “lossy com­pres­sion” algo­rithm, which is so named because some of the orig­i­nal image data is dis­card­ed to attain small­er file sizes that require less stor­age space for each image and allow for their rel­a­tive­ly quick trans­fer between devices or for down­load­ing and upload­ing to online ser­vices. The amount of data dis­card­ed is depen­dent on two fac­tors, the com­pres­sion ratio and the con­tents of the pho­to­graph. High­er lev­els of JPEG com­pres­sion pro­duce small­er file sizes that result in low­er image qual­i­ty. Low­er lev­els of JPEG com­pres­sion pro­duce larg­er file sizes that result in high­er image qual­i­ty. The con­tent rep­re­sent­ed in your pic­tures will also influ­ence the amount of data required to store it. Pho­tos that fea­ture dense­ly-packed tex­tures and many vari­a­tions in colour and con­trast will require more data than pho­tos with more straight­for­ward visu­al ele­ments and few­er intri­ca­cies.



Interior of the cafebreria el pendulo in Mexico City.
This pho­to fea­tures intri­cate tex­tures and vari­a­tions in colour. At its cur­rent res­o­lu­tion and com­pres­sion set­ting, it requires 397 KB for stor­age.
Silhouette of bookshelves against window in Chocolate Macondo near Teotihuacon, Mexico.
This image fea­tures large, sim­ple blocks of colour and tonal vari­a­tion which require less data to store. Despite its res­o­lu­tion and com­pres­sion set­ting being iden­ti­cal to the pre­vi­ous pho­to, it uses only 88 KB for stor­age.

JPEG image quality settings

Many dig­i­tal cam­eras allow you to set the record­ed image res­o­lu­tion and qual­i­ty. Image res­o­lu­tion, rep­re­sent­ed as the total pix­el count or pix­el dimen­sions (hor­i­zon­tal x ver­ti­cal), deter­mines how much detail your cam­era records and direct­ly cor­re­sponds to the max­i­mum accept­able print­ing size. Image qual­i­ty direct­ly affects the fideli­ty of sub­tle tex­tures, such as hair and fab­rics, and the smooth tran­si­tion of tones and colours. In your cam­er­a’s menu sys­tem, image qual­i­ty options are often described by ter­mi­nolo­gies such as Fine or High (low com­pres­sion), Stan­dard or Nor­mal (medi­um com­pres­sion), and Low or Basic (high com­pres­sion). 

Alameda de Santa Maria in Mexico City
The JPEG qual­i­ty set­tings on most cam­eras are well-cal­i­brat­ed. It takes more than a cur­so­ry glance at the whole image to detect the sub­tle dif­fer­ences that changes to JPEG qual­i­ty impart.


Low amount of JPEG compression.
This 200% enlarge­ment of a small sec­tion from the full image shows a high­er-qual­i­ty JPEG image (low com­pres­sion).
High amount of JPEG compression
This 200% enlarge­ment of a small sec­tion from the full image shows a low­er-qual­i­ty JPEG image (high com­pres­sion). There’s the pres­ence of JPEG arti­facts (block­i­ness, smudg­ing, false colour) around high-con­trast edges and loss of def­i­n­i­tion in the blue coloura­tion of the flower etch­ings.

JPEG storage

Mar­ket prices for the flash mem­o­ry cards used by dig­i­tal cam­eras are at his­tor­i­cal lows. Pur­chase a high-capac­i­ty mem­o­ry card (32 GB or high­er) and always save your dig­i­tal pho­tos at the high­est res­o­lu­tion and image qual­i­ty that your camera’s JPEG set­tings per­mit. You can fit approx­i­mate­ly 3,800 high-qual­i­ty 24-megapix­el images onto a 32 GB mem­o­ry card. Keep in mind that your mileage may vary depend­ing on the visu­al com­plex­i­ty of your scene due to the dynam­ic nature of JPEG com­pres­sion. 

JPEG images are processed

The cam­era process­es all JPEG images for you. After tak­ing a pho­to, the data gen­er­at­ed by the image sen­sor is dig­i­tized and inter­pret­ed accord­ing to the stan­dards adopt­ed by your camera’s man­u­fac­tur­er. This auto­mat­ic image pro­cess­ing may include some of the fol­low­ing oper­a­tions: colour map­ping, colour ton­ing, colour fil­ters, sat­u­ra­tion, con­trast, noise reduc­tion, white bal­ance, high­light pro­tec­tion, shad­ow enhance­ment, and sharp­en­ing. You can make slight adjust­ments to some of the image pro­cess­ing per­formed by your cam­era using pic­ture pro­file con­trols. 

JPEG images aren’t meant for editing

In gen­er­al, JPEG images are con­sid­ered the final prod­uct for most con­sumers. Giv­en the processed and com­pressed nature of the for­mat, once your cam­era gen­er­ates a JPEG pho­to, your abil­i­ty to alter its appear­ance is lim­it­ed. For exam­ple, although you can make minor adjust­ments to bright­ness, sat­u­ra­tion, and white bal­ance, any major manip­u­la­tions will quick­ly degrade the qual­i­ty of the pho­to­graph. Fur­ther­more, it’s entire­ly impos­si­ble to undo exces­sive sharp­en­ing, recov­er sub­tle tex­tures lost to heavy-hand­ed noise reduc­tion, or restore colour to a black-and-white image (although you can eas­i­ly per­form the reverse oper­a­tion). Raw for­mat images are meant for this type of post-pro­cess­ing.


Overexposed portrait of man with a Portuguese water dog.
This por­trait of my dog and I was acci­den­tal­ly over­ex­posed, which is par­tic­u­lar­i­ly appar­ent on my face. The cam­era was set to save both JPEG and raw files for every pho­to. The fol­low­ing two images show what hap­pens when iden­ti­cal cor­rec­tive edit­ing is applied to each of those file types.
Overexposed portrait of man with a Portuguese water dog, corrected raw file.
The raw ver­sion of the pho­to­graph was processed to low­er the effec­tive expo­sure and reduce the bright­ness of the high­lights (my skin tone). Note the appear­ance of the tone of the skin on my face and hand.
Overexposed portrait of man with a Portuguese water dog, corrected JPEG file.
The JPEG ver­sion of the pho­to­graph was processed in a man­ner iden­ti­cal to the raw image: low­er­ing effec­tive expo­sure and reduc­ing bright­ness of the high­lights. Note how despite the entire scene los­ing some con­trast, my face has lost fideli­ty, gained sat­u­ra­tion, and acquired an unpleas­ant melt­ed cheese-like yel­low­ish tinge.

What is the raw image format in photography?

Raw is a cat­e­go­ry of file for­mats that con­tain unprocessed image data saved from the image sen­sor. Most cam­era man­u­fac­tur­ers use pro­pri­etary raw for­mats that are not uni­ver­sal­ly view­able across all devices. These include a vari­ety of file­name exten­sions, such as .cr2 for Canon, .nef for Nikon, .raf for Fuji­film, .arw for Sony, .orf for Olym­pus, .pef for Pen­tax, .rw2 for Pana­son­ic, and .dng for Leica. Some cam­eras give you the option of sav­ing raw image files with no com­pres­sion, with loss­less com­pres­sion (recon­struct­ing the orig­i­nal data with­out infor­ma­tion loss), or with lossy com­pres­sion. All three vari­ants, includ­ing the last, pro­duce image qual­i­ty far sur­pass­ing that of JPEG images.

After your cam­era saves a raw image, it process­es the data to gen­er­ate a small pre­view image that’s attached to the raw file. When you review the pho­to on your camera’s rear LCD, you see the pre­view pic­ture. This pre­view image con­tains the same in-cam­era pro­cess­ing applied to JPEG images. This pro­cess­ing only affects the attached pre­view and does not change the raw image data, which is unaf­fect­ed by your camera’s manip­u­la­tion of sat­u­ra­tion, sharp­en­ing, white bal­ance, and so on.

The main ben­e­fit of sav­ing your pho­tos in raw for­mat is that the files are bet­ter suit­ed to post-pro­cess­ing. They pre­serve all of the data cap­tured by your camera’s image sen­sor, which allows for a broad and more nuanced rep­re­sen­ta­tion of the colour palette and tonal range of your sub­ject.

Unprocessed raw format image
For the sake of argu­ment, a raw for­mat image that has not been edit­ed is gen­er­al­ly flat and bor­ing. Here, I have exag­ger­at­ed the effect. Note that I did­n’t say “unprocessed,” for all raw data must be processed to some extent to be seen.
processed raw format image
This ver­sion of the same pho­to­graph has been edit­ed to taste. (Of course, both images have been uploaded to this web­site in the JPEG for­mat as you can’t direct­ly view raw files in a web brows­er. Go fig­ure!)

Raw converters

You can open and process raw images on a com­put­er using spe­cial­ized soft­ware (“raw con­vert­ers”) that can process and export the pho­tos into more wide­ly acces­si­ble image for­mats, such as JPEG, TIFF, GIF, or PNG. In gen­er­al, each man­u­fac­tur­er includes access to raw con­vert­ers with the pur­chase of their cam­eras. For instance, Canon, Nikon, and Olym­pus devel­op raw con­vert­ers that work with each of their respec­tive pro­pri­etary raw for­mats, where­as Fuji­film includes licens­es to fea­ture-lim­it­ed ver­sions of soft­ware cre­at­ed by a third-par­ty devel­op­er. Alter­na­tive­ly, you can open raw images from pop­u­lar cam­eras using com­mon­ly avail­able third-par­ty raw con­vert­ers such as Adobe Light­room CC, Phase One Cap­ture One Pro, Sky­lum Lumi­nar, SILKYPIX, and even Apple Pho­tos for Mac. 

Since raw images must be processed to be view­able, when you first open a raw image in a raw con­vert­er, the soft­ware will apply some base­line pro­cess­ing. Thus, it’s com­mon for pho­tos ini­tial­ly opened in raw con­vert­ers to appear sub­dued and dull in com­par­i­son to the pre­view images and JPEGs cre­at­ed by cam­eras. There is noth­ing wrong with the file or your pic­tures; the soft­ware is leav­ing the major pro­cess­ing deci­sions to you. Many raw con­vert­ers allow for the quick appli­ca­tion of per­son­al­ized set­tings and adjust­ments, known as pre­sets, to images dur­ing the import­ing phase, or at any point after­wards. Such pre­sets aide pho­tog­ra­phers in quick­ly view­ing more pre­sentable ver­sions of their pho­tos.

Raw image editing is non-destructive

When you edit raw images, you per­form “non-destruc­tive” oper­a­tions, so-called because the orig­i­nal data in the raw image file is not changed, mod­i­fied, or saved over (i.e., destroyed or irre­triev­ably altered) dur­ing the edit­ing process. Instead, the appli­ca­tion records the adjust­ments you make as a set of instruc­tions for manip­u­lat­ing the orig­i­nal raw data. If you save the changes and sub­se­quent­ly open the same file on a future occa­sion, the raw con­vert­er will apply the saved adjust­ment instruc­tions to the orig­i­nal raw data, ren­der it accord­ing­ly, and dis­plays the pho­to­graph. 

With some raw con­vert­ers, these pro­cess­ing instruc­tions are saved as sep­a­rate files, known as “side­car” files, that remain along­side the raw files and have the same file­name but dif­fer­ent file exten­sion (typ­i­cal­ly .xmp). Oth­er raw con­vert­ers forego cre­at­ing a side­car file by sav­ing adjust­ment instruc­tions in their inter­nal data­bas­es. Last­ly, if your raw con­vert­er sup­ports it, Adobe’s .dng raw for­mat saves adjust­ment instruc­tions direct­ly into the raw file with­out alter­ing the image data.

Should you use JPEG or raw?

Whether to pho­to­graph using JPEG or raw is a per­son­al deci­sion you should make after con­sid­er­ing the advan­tages and dis­ad­van­tages of both image for­mats. For­tu­nate­ly, many cam­eras offer a set­ting that saves each pho­to you cap­ture as both a raw file and a JPEG file. This option pro­vides you with the uni­ver­sal ease of use of the JPEG for­mat and the image qual­i­ty and edit­ing poten­tial of the raw for­mat. Of course, this cre­ates twice as many files for you to orga­nize and requires more stor­age capac­i­ty on your mem­o­ry card, com­put­er, and back­up dri­ve. Despite this, choos­ing to save both lets you try each format—and more specif­i­cal­ly, test your prowess at work­ing with raw files—without com­mit­ting to either. 

A JPEG file cre­at­ed by a cam­era whose expo­sure and pic­ture para­me­ters are cor­rect for the scene will pro­duce images that are suit­able for large for­mat dis­play and print­ing. It’s not wrong to pre­fer using JPEG; how­ev­er, it’s much less for­giv­ing of expo­sure and pic­ture set­ting errors than raw files when cor­rec­tive edit­ing is required. The under­stand­ing and cor­rect oper­a­tion of basic cam­era set­tings and expo­sure con­trols are imper­a­tive for the JPEG-only pho­tog­ra­ph­er. (If you’re a hands-on learn­er and live in the Greater Toron­to Area or plan on vis­it­ing, con­sid­er­ing tak­ing our intro­duc­tion to pho­tog­ra­phy class to learn how to max­i­mize your JPEG pic­ture-tak­ing.)