JPEG or RAW, which is better to shoot in? RAW or JPEG, which is better? Which format is better raw or jpeg

Many new photographers take pictures in RAW format and don’t know why they are doing it. When asked: “Why?” - they answer: “What are you talking about, this is cool! All professionals of our time shoot in RAW format!” If you have the same opinion, then this article is just for you.

Imagine, you recently bought a camera, saw how to change formats and immediately went to the Internet, or went to friends to find out which format is best to shoot in...

If you don’t know which format is best to take photographs in, choose JPEG.

Why? - I'll explain now.

JPEG(aka JPG) the most famous and popular format for images. It is readable everywhere, even on your mobile phone. Any digital camera takes photographs in JPEG format; JPEG provides excellent quality with minimal time spent on processing.

RAW(English) raw: raw) is a file that contains raw data directly from the camera matrix. Intended for further adjustment and processing.

This is exactly how it all happens:

RAW - designed for further adjustments and processing, a paradise for designers. You can tinker with it for a long time and tediously, for example, adjust exposure, contrast, brightness, change white balance, and most importantly, all the changes you make do not significantly affect the loss of photo quality. Essentially, you can change all the values ​​that can be set on the camera before shooting.

Main disadvantages of RAW:

1) since the “raw” format weighs several times more than the JPEG format, you will need quite a lot of space to store files in this format.

2) you still need to convert RAW to JPEG format in order to show it to friends or print it.

3) time is money, and working with the RAW format will take you a lot of time, both processing the images and converting them.

4) different camera manufacturers have their own settings and standards for RAW files (this is noticeable by the extension of RAW files, for example: for nikon it is .NEF, and for canon it is .CRW, for sony it is .ARW), of course because of this there is a large There is a lot of software for editing RAW files, the problem is that in different RAW editors, the same RAW file will look different.

5) The speed of photographing in RAW is much slower due to the processing of larger files, as a result you may miss the moment, for a photographer this is unforgivable!

Loved and read everywhere. A JPEG file is created from a RAW file, using your settings on the camera, such as white balance and color settings, which you can change significantly during processing.

The JPEG format uses varying degrees of compression. On the camera you can see JPEG Fine, JPEG Normal and JPEG Basic. The higher the JPEG quality, the more space the file takes up. Which compression should you choose? It's up to you to decide what is more expensive - memory card space or quality. Take a closer look at JPEG Normal, since the difference in quality between Normal and Fine is almost unnoticeable, and the space taken up in JPEG Fine is twice as large. I advise you to experiment before choosing.

RAW+JPEG

Most likely, if you understood setting up camera formats, you saw the RAW+JPEG option. In this case, the camera will create two files: JPEG and RAW.

As a result, we get both, although the downside is that this will require even more space and your time. Moreover, if you do not free up disk space, you will have mountains of unnecessary copies that will be a pity to delete...

conclusions

If you have not decided which format to take photographs in, definitely choose the JPEG format.

If you are engaged in design, choose RAW format.

If you take many identical photographs of the same object and then choose the best one from them, shoot in JPEG. If you take only one photo instead of a dozen, shoot in RAW.

Decide what you like, if you want to become a photo reporter, you need to get used to doing everything clearly and quickly, learn how to properly configure the Camera. If you want to spend more time in front of the monitor than with the camera, shoot in RAW and learn Photoshop.

Article and photos reprinted from Kostya Kakushi's blog:

© 2014 site

The electrical signal generated at the moment of shooting by the matrix of a digital camera enters the camera processor in the form of an array of digitized, but not yet processed or, if you like, “raw” data. This data is then either written without further processing to the memory card in the form of a so-called. RAW file, or are pre-processed by the camera processor, which forms a full-fledged image based on them and saves it in JPEG format. JPEG photographs are the final product of the photographic process and are fully suitable for viewing, printing, publishing online or for any other practical use. Images saved as RAW files must be edited in a special converter program, which allows you to turn the raw data provided by the matrix into a graphic image in JPEG or TIFF format. Shooting in RAW is used in cases where the photographer, for one reason or another, does not want to trust the camera processor to process the image and prefers to do the conversion himself. In any case, all digital photos are born as RAW data and the end result is a JPEG, but manual conversion provides more control over the properties of the final image compared to automatic in-camera conversion. It's important to understand that using RAW doesn't necessarily improve image quality, it just makes the photo process more manageable and predictable.

While JPEG is a full-fledged graphics format with a .jpg extension, RAW does not denote a separate file format, but rather a family of formats that have different specifications and extensions depending on the camera manufacturer: .cr2 (Canon), .nef (Nikon) , .arw (Sony), .pef (Pentax), .orf (Olympus), .raf (Fujifilm), etc.

In addition to digitized brightness values ​​for each photodiode of the matrix, the RAW file contains a JPEG image generated by the camera, necessary for preview, as well as various metadata, such as: specifications of the camera and its matrix, description of exposure parameters, white balance settings and image styles, date and shooting time.

By its nature, a RAW file is not an image, but it contains the information necessary to form an image. Because of this, a RAW file is often compared to a film negative in traditional photography. Digital negative is a good metaphor. Just as a traditional negative, which contains a latent image after exposure, needs to be developed, a RAW file needs to be converted in order for the hidden image in it to see the light of day. And just as a traditional photographer has a choice: send the film to a darkroom for automatic development and printing, or develop and print it himself, controlling all the nuances of the photographic process, so a non-traditional digital photographer can choose whether to entrust the conversion to the camera processor or edit the files manually using RAW -converter.

Despite the fact that I myself shoot primarily in RAW, I do not encourage you to follow my example. This is an individual matter. Both RAW and JPEG have their own unique advantages and disadvantages, and therefore neither approach can be considered unconditionally better.

Advantages of JPEG

  • Shooting in JPEG saves time. Manual image processing is a slow process and requires special skills.
  • A JPEG shot with a good camera looks better than a poorly edited RAW.
  • JPEG files take up much less space on both the memory card and hard drive. Storing a large number of RAW files eats up disk space faster than you'd like.
  • Because small files are written to the memory card faster, the camera's buffer also frees up faster, allowing you to shoot longer bursts when shooting continuously.
  • JPEG is the most versatile and popular graphics format. JPEG photos are ready for use immediately after shooting. They can be easily opened in any program, and after decades they will still be available for viewing and editing. At the same time, RAW files cannot be rendered directly and require a specific converter that supports a specific RAW format, a specific camera and a specific lens. Photography equipment manufacturers have a bad habit of changing their standards from time to time, and no one can guarantee that current RAW files will be readable in the future.

Benefits of RAW

  • RAW files have a bit depth of 12 to 14 bits (4096-16384 gradations), while JPEGs are only 8 bits (256 gradations). High bit depth makes very bold manipulations with the image possible without the risk of posterization and other artifacts. The difference between RAW and JPEG is especially noticeable when trying to brighten dark areas of the frame.
  • The photographic latitude of a RAW file is several stops greater than that of a JPEG, which is important when shooting in contrasting lighting conditions.
  • A RAW file does not formally have a color space, and all color manipulations are performed before converting the data to the gamut-limited sRGB palette of the final file.
  • White balance can be adjusted after shooting.
  • Brightness, contrast, color saturation, noise reduction, sharpening and other image parameters are under the complete control of the photographer.
  • Editing RAW files is non-destructive: the original data remains intact during processing and can always be returned to for a new conversion.
  • Different RAW converters interpret the RAW file in different ways, which allows the photographer to choose a program in accordance with his taste and requirements for image quality.

Which format should I choose?

Many novice amateur photographers, having learned about the existence of RAW formats, come to the conclusion that they need to shoot only and exclusively in RAW, since this is supposedly a sign of professionalism. This is fundamentally wrong. Professionals use both RAW and JPEG with equal success, depending on their needs. For example, landscape photographers usually work with a relatively small number of photographs, but value image quality and pay a lot of attention to the individual processing of each image, and therefore work mainly with RAW. Photographers, on the contrary, shoot mainly in JPEG, because they know that their footage will still be published in a small size, but the editor needs to quickly provide the newly shot material as quickly as possible in a form ready for publication.

Let’s now try to figure out which format is right for you personally.

You should shoot in JPEG if...

  • You are new to photography. Indeed, if you're planning to shoot in RAW just because you want to be able to correct exposure or white balance errors after the fact, wouldn't it be better to learn how to avoid such mistakes first?
  • Image quality is not of fundamental importance. This is true not only for reporting, but also for most amateur protocol photographs.
  • You produce a huge number of photos and don't want to waste time converting them.
  • Your photos do not need aggressive processing.
  • You are completely satisfied with how the photos look when they come out of the camera. It’s not a good life to mess with RAW files, and if you manage to achieve the desired result using the camera, then there is no need to complicate everything.

You should shoot in RAW if...

  • You have time, desire, excess disk space and confidence in your own advantage over a soulless machine.
  • You tend to put a lot of creative thought into your photos. This is where the redundant information contained in the RAW file comes in handy.
  • You're looking to get the most out of the dynamic range of your camera's sensor.
  • You're simply not happy with the way your photos look when they come out of your camera, and you're convinced that they'll look better when they come out of a RAW converter.

RAW+JPEG

Some photographers prefer to shoot in RAW+JPEG mode, which allows each photo to be recorded in two formats at once. There is a rational grain in this. You immediately receive finished photos in JPEG format and, if they are ok, continue to work with them, and in cases where in-camera processing did not cope with its task, you turn to RAW files and convert them manually.

If you're someone who personally edits most of their photos, then the extra JPEG becomes unnecessary. Shoot in RAW, and if you need an in-camera JPEG for some shots, it can be easily generated from a RAW file. Image processing software that comes with the camera (for example, Nikon View NX or Canon Digital Photo Professional) usually allows you to convert the image "as is", successfully simulating in-camera processing.

TIFF

I don't see the point in shooting in TIFF format even if your camera has that option. TIFF contains already interpolated and processed data and therefore cannot serve as an alternative to RAW if you plan to seriously edit your photos. Also, TIFF does not have any practical advantage over JPEG, although it takes up much more space. At the same time, the TIFF format is quite appropriate for intermediate processing of already converted photographs, as well as for their subsequent storage.

When shooting in JPEG, your work on the photo should be considered largely complete as soon as the shutter is released. In this regard, all decisions that affect the final appearance of the photo must be made in advance, and the camera settings must fully comply with the shooting conditions.

Exposition

The exposure must be flawless. You will be able to lighten the shadows slightly, but the highlights will be lost forever. When determining exposure, you should focus on subjects that are significant in the scene, even if this automatically leads to overexposure or underexposure of secondary elements of the frame.

White balance

White balance needs to be determined as carefully as possible, since color correction of a JPEG file is fraught with headaches. Learn to use fine-tuning white balance, and in the most critical situations, set the white balance manually.

Picture style

Picture Style determines the overall appearance of a photo and affects parameters such as contrast, brightness, color saturation, color balance, and sharpness. Despite the fact that all these properties can be adjusted in Photoshop, it is still advisable to immediately guess the style at the time of shooting. When in doubt, choose more neutral styles with lower contrast, saturation and sharpness values, as these parameters are easy to boost later, but very difficult to lower without damaging the image.

Quality

I advise you to shoot in high quality, i.e. with the lowest compression ratio. You can always resave pictures with lower quality, but you won’t be able to get rid of over-compression artifacts. Choose the resolution based on practical needs.

Color space

If sRGB is not set by default, then you should manually select sRGB. This is the most universal color space and by choosing it, you are protected from incorrect display of colors in various programs.

Noise reduction

It is advisable to select the minimum required noise reduction level so that your photos do not take on an overly glossy appearance. Even better, the camera can automatically adjust the level of noise reduction according to the ISO sensitivity value.

Editing

As has been said many times, JPEG is not designed for deep processing, but minimalist editing can be quite acceptable. Acceptable: slight increase in contrast and color saturation, selective sharpening, delicate lightening and darkening. Touching up debris and pimples is also not a crime.

You should shoot in RAW with an eye toward post-processing the frame. When choosing shooting parameters, you must not only take into account current conditions, but also plan in advance the further stages of the implementation of your creative plan. The more clearly you imagine the strategy for converting your future photo, the more manageable the entire photo process will be.

Exposition

Expose according to the light using the ETTR (Exposure To The Right) principle. If the scene has high contrast, the photo may turn out quite dark. It doesn't matter - you can easily lighten it in a RAW converter, while preserving the detail in the highlights. It should be remembered that at the time of shooting you are not trying to get the final result, but rather a preparation for future photography.

If you use a histogram to determine exposure, keep in mind that it is calculated based on the JPEG thumbnail, which means it is affected by white balance and picture styles, and in some cases may lie about the actual exposure. Over time, you will learn to recognize these situations and make appropriate adjustments.

White balance

White balance settings at the time of shooting do not affect the RAW data in any way, but they do affect the histogram, and therefore it makes sense to adjust the white balance at least approximately by choosing one of the ready-made modes. You will make fine tuning later.

Picture style

Choosing an image style, again, does not oblige you to anything, but personally I am pleased when a photograph looks more or less presentable on the camera screen. If you don't have time for that kind of aesthetic, then just go for Neutral or Faithfull.

Quality

Color space

The color space set in the camera (sRGB or Adobe RGB) has absolutely no meaning and does not in any way limit the really important choice of color space coming out of the RAW converter. However, I prefer to have the camera set to sRGB in case I want to shoot in JPEG.

Noise reduction

Noise reduction settings can be safely ignored except for subtractive dark noise reduction at long exposures. The latter affects both JPEG and RAW.

Editing

My personal procedure for converting RAW files is described in sufficient detail in the article “How to use Adobe Camera Raw”. The popular catalog editor Adobe Lightroom uses the Camera Raw engine, and therefore conversion to Lightroom can be carried out using a similar protocol. DxO Optics Pro and Phase One Capture One PRO are also good converters. The programs offered by photographic equipment manufacturers are not very convenient, and their only purpose, in my opinion, is to quickly convert RAW to JPEG using camera settings.

Thank you for your attention!

Vasily A.

Post scriptum

If you found the article useful and informative, you can kindly support the project by making a contribution to its development. If you didn’t like the article, but you have thoughts on how to make it better, your criticism will be accepted with no less gratitude.

Please remember that this article is subject to copyright. Reprinting and quoting are permissible provided there is a valid link to the source, and the text used must not be distorted or modified in any way.

Photographers never stop arguing about which format to choose for photographs when shooting. We are talking about RAW and JPEG (sometimes JPG). Despite the fact that in general most experts understand the difference between these two formats, the understanding of amateurs is not always clear. Photographer and teacher Wayne Rasku, who teaches web-based photography classes in Atlanta, Georgia, USA, has pieced together the information and controversy. In the article, he tried to explain what the essence of formats is and how to understand which format should be used to get the maximum effect in the result.

JPEG vs RAW

JPEG is a common format for photographs, it's simple. If you send images to the Internet or print pictures, then most likely the files are saved in the JPG format. However, questions have accumulated regarding JPEG regarding the integrity of the images. Of course, the format is described as the most common image compression format, the main one for most digital cameras. But technically it is a "lossy alteration" that degrades the original images. This is where the main problem lies, the starting point of discussions about what format to take and save pictures in.

What is the disadvantage of lossy compression? Essentially, the camera is initially programmed to transform the file to a smaller size by discarding some of the pixels. Depending on the selected settings, the compression will be greater or less. If you set the file size to the largest possible, the camera will discard the minimum amount of data. If you need to fit as many pictures as possible, you set a lower resolution - for example, 640x480, while the maximum possible for a 10-megapixel camera is 3648x2736. The camera simply will not save all the “extra” pixels, leaving only the required number.

For viewing on the display of a digital camera, this may be quite enough, but for printing large-scale images, the quality will be completely unacceptable. Those same unpleasant pixel squares will remain in the picture, and the photo will have to be reduced, sometimes to unacceptable sizes.

Any post-processing, including Photoshop, compresses images even more. Most people don't morph their images multiple times, but if you do, the problem becomes even more pronounced.

How is RAW format different from JPEG?

By changing the file format in the camera from JPEG to RAW, you “warn” it that it does not need to process the images at all, so it saves all the pixels in the image. That's all. The resulting file will be much “heavier” than when choosing JPEG, even if the latter is set to the largest frame size. Also, the difference between the formats is the “depth” of the pixels. JPEG uses 8-bit, whereas most DSLR cameras range from 13-14 bits per pixel. This spread results in areas of similar brightness being combined, which is not the case when choosing the RAW format. This affects, in particular, white balance and the ability to fine-tune exposure. By the way, when working with RAW, you can make an HDR photo from a single file.

photo by Peter Majkut

The next logical question is how to properly process a photo in RAW so that it can be printed or posted online? The situation is almost the same as with film cameras: to see a full-fledged photograph, you need to tinker with the negative. It's the same with RAW - you'll need post-processing software to help make the original file suitable for further use.

Another important difference with RAW is that you won't be able to use any of the camera's "creative" modes. Manual adjustment of aperture and shutter speed is available, but when selecting preset combinations of parameters (“party”, “sunny beach”, etc.), the camera will automatically change RAW to JPEG.

To summarize: this format saves the full set of pixels for you, but you will have to learn how to process the images. In addition to this, you can format your photos, crop them, and make them brighter in post-processing with minimal loss.

What is the essence of the dispute about the choice of format?

Some photographers advocate RAW, others are supporters of JPEG. This is due to several reasons. Firstly, not all cameras support the RAW format. For example, it is not provided in compact digital cameras. On the other hand, filming in it allows you to “use all resources” and get the highest quality results. RAW devotees say it gives them complete control over their photos.

Some, including highly professional authors, resist, continuing to work in JPEG. They claim that, being confident in their abilities, they can get good results in this format. In their opinion, RAW lengthens the workflow due to painstaking post-processing and deprives the photographer of the opportunity to spend most of his time on shooting. JPEG fans don't want to sit at the computer, they want to work more directly with the camera.

Another argument against RAW is file size. It is almost twice as large as JPEG, and the memory card resources are exhausted faster. It is also inconvenient to store them on a hard drive if you shoot a lot. RAW formats are not unified; they differ depending on the camera itself, even down to the extension. In particular, for Nikon it is a.NEF, and for Canon it is a.CR2. If you frequently use different cameras, this can make life more difficult.

You also need to remember that outdated software cannot work with images from the latest generation cameras. As photographer Ken Rockwell, a fierce opponent of RAW, argues, "one day we will simply not be able to open our old files, because the necessary versions of the programs will no longer exist." And, if you're constantly updating your software, be prepared to lose images you took years ago. With JPEG this problem is not present - and this is an argument worth considering.

And finally, the main thing. How to understand which format is right for you

If you know how to quickly and easily work with specialized photo post-processing software, and want full control over the nuances of editing your photos, you should go for RAW. By the way, it is not necessary to buy programs. The format is supported even in free software (such as Picassa), not to mention a variety of specialized software.

If you don’t want to add another, and difficult, stage to your workflow, you are not ready to conquer the next level in the art of photography, or you are not going to purchase specialized programs, choose the JPEG format.

You just need to remember that such a file cannot be converted to RAW, but quite the opposite. Therefore, most professional photographers still try to get to know the more labor-intensive format better. RAW for them is the key to a large number of possibilities. In addition, there is always a compromise: you can save pictures on the camera in two formats at once. If the memory card capacity is sufficient, this is the best option: you will leave the most successful images unchanged in JPEG, and take those that require correction from a RAW source.

A small note for those who still chose RAW. There are several successful complex programs, working with which you will be able to realize all the capabilities of the format. One of the most popular is Adobe Lightroom. There are many tutorials on the Internet that tell you how to edit raw files using powerful, interesting software tools. The program is especially suitable for landscape photography: if you like working in nature, Lightroom is worth mastering, and the results will impress you.

If you shoot with a digital camera (oh well... since you are reading this blog, it means you know how to use the Internet and other benefits of civilization, that means you are a normal modern person, then... why this “if” - you definitely shoot with a digital camera)... So Now, since you shoot on a digital camera, you definitely faced the question of whether to shoot in RAW or JPG. And it is precisely this question that we will answer in our short article.

First of all, RAW and JPG are different formats created for different purposes. And each of them has its own pros and cons. The most important thing is to understand whether you really need the capabilities that RAW provides, or is the simplicity and compatibility of JPG more important to you?

To do this, we compare all the strengths and weaknesses of each format. So.

.JPG

The main task of the JPG format is to convey the highest quality image with minimal memory consumption. This is where all of its shortcomings come from, but also its advantages:

  1. When you shoot in JPG, you immediately get a finished image. You can immediately send the photo to print or post it on the Internet.
  2. JPG photos take up significantly less space than RAW or TIFF files.
  3. The colors in your photos will immediately be exactly as the camera sees them. When working with RAW, you will have to use the right RAW converter.
  4. By shooting in JPG, you can immediately adjust the sharpness, saturation and contrast settings of your photos. You can also enable the automatic noise reduction function.
  1. The possibilities for further processing are much smaller than when shooting in RAW.
  2. When shooting in JPG, the fine details in the frame are lost. When printing photos in large format, there will be a noticeable loss of quality.
  3. On many DSLR camera models, when shooting in JPG, the overall sharpness of the photo is worse than when shooting in RAW.

Bottom line

JPG is the ideal format for those who value simplicity and ease of use. You can take photos and send them straight to print in a darkroom or on your home printer. Having copied them to your computer, you can immediately send them to your friends on the Internet. They take up little space on a flash card and you will always have enough JPG to print a 10x15 or 15x20 photo in good quality.

If you need to shoot a large volume of photos (500, 1000, 1500 frames) and you don’t have time to process all these photos in a RAW converter, choose JPG, because that’s what it was created for.

.RAW

The RAW format is “raw”, i.e. it requires subsequent conversion to JPG or TIFF. The fact is that when shooting in RAW, all information from the camera’s matrix is ​​saved into the photo file. It is thanks to this “rawness” that we have extensive processing capabilities, but also all the inconveniences associated with converting files.

  1. Processing capabilities. First of all, these are opportunities for working with color - you can already change the white balance in a photo on your computer. You can also process individual colors in a photo, work in detail with areas of shadows and highlights, contrast and saturation of the image. A very important point is that when shooting in RAW, additional information is saved in the file, using which you can “get” image details from overexposed or dark areas of the frame.
  2. By shooting in RAW, you can use precise noise removal and sharpening algorithms.
  3. The RAW file provides great opportunities for color styling and artistic processing of photographs.
  4. Most RAW converters have a function for saving processing settings. Once you've done the processing, you can apply it to other photos with one click.
  5. From a RAW file, you can convert an image into any format you need, be it a low-resolution JPG file for publishing on the Internet or a high-resolution TIFF file for large-format printing.
  1. A RAW file takes up much more space than a JPG.
  2. RAW files cannot be immediately sent to print or published on the Internet.
  3. To convert RAW files, you must use special programs - RAW converters. Learning RAW converters can only be interesting and fun if you are really serious about photography. Otherwise, this process will only be an additional headache for you.
  4. The process of converting RAW files itself takes extra time and requires a computer with good performance.

Bottom line

The RAW format is used by all professional photographers and photo artists. For them, the processing capabilities and picture quality that RAW provides are a necessity. If you're a serious photographer, interested in working with color, or want to print photos in large formats, try shooting in RAW.

P donkey WITH fishing
In any dispute, a compromise can be found. And the dispute between formats is no exception, because you can always enable the function of simultaneous shooting in both RAW and JPG on your camera. This will, of course, require more space on the memory card, but you will be able to use the strengths of both formats.

I am often asked questions to which I cannot give a short answer, if the answer is really to the point. The questions are something like this:

  • Why is raw better than jpeg?
  • Why is raw not as sharp as jpeg?

Now, with a clear conscience, I will redirect everyone who asks to this article.

To begin with, we will have to get a little acquainted with how the sensor of most cameras, or the matrix, as it is also called, works. It consists of a large number of tiny photosensitive elements that record the amount of light falling on them. These elements are called by different names, but for simplicity we will call them pixels. Each of them is covered with a filter of one of three RGB colors - red, blue or green. As a result, each color pixel is sensitive only to “its” color (for more information, search for “Bayer filter”).

During shooting, something like this happens: readings are read from the sensor pixels, amplified in accordance with the selected ISO, and converted into digital information, usually 12-bit, less often 14-bit. This is RAW, raw data. What is recorded in them can be very simplistically represented as follows: the first pixel grabbed the amount of light 2015, the second pixel - 1589, and so on. If the camera shoots in 14 bits, each pixel can be assigned one of 16384 values. There is a circuit that goes with it all: this pixel is blue, this one is red, this one is green. Besides this, the raw file contains a lot more, but we are not interested in it at the moment.

Further, if you choose to shoot in RAW, this data is simply written to the memory card in a specific format developed by the manufacturer of this camera. For example, Nikon uses NEF, Canon uses CR2 or CRW, Pentax uses PEF, and so on. All these formats are varieties of RAW.

If you chose to shoot in JPEG, this data is first processed by the camera processor to produce a JPEG and only then is this JPEG written to the card. During this processing, various transformations are used, of which the following are worth highlighting:

  1. Color interpolation. Each pixel on a camera sensor only has information about one color. An image consisting of squares of three colors with different brightness will look more like a mosaic than a photograph. With color interpolation, each pixel becomes a normal, three-color color. It does this by collecting color information from neighboring pixels. In English, this process is called demosaicing, which can be clumsily translated as “demosaicing.”
  2. 12 or 14 bits converted to 8 bits, since JPEG can only be 8-bit. These four discarded bits are not as small as they might seem. If 12 bits can have 4096 states, then 8 bits have only 256, 16 times less. In a RAW file, pixels do not have color channels and information about one pixel takes up only 12 or 14 bits. RAW is essentially a monochrome format. In a color 8-bit file, one pixel has three channels, each of which is allocated 8 bits, that is, information about one pixel takes 24 bits or 3 bytes, which is twice as much as in a RAW file. This is why even 8-bit TIFF with lossless compression takes up twice as much disk space as RAW (many raws also use lossless compression). 16-bit TIFF with compression takes up about 6 times more space than RAW.
  3. Colorimetric interpretation. Red, blue, green are very vague concepts. The algorithm needs to know “how much to weigh in grams.” The correct color of the entire image depends on this. Therefore, precise mathematical values ​​are assigned to RGB colors.
  4. White balance. The white balance you set does not affect the sensor in any way. This setting only applies to RAW-JPEG conversion.
  5. Gamma correction. If you don't do this, the image will be dark. The human eye enhances weak light and dims intense light. By the way, all our feelings are nonlinear. The sensor perceives light absolutely uncomplicatedly, linearly, as much electricity as it receives, it gives out as much electricity. Therefore, an adjustment is necessary to simulate human perception.
  6. Sharpening. When color interpolation occurs, sharpness decreases. The algorithm looks for contrasting boundaries and enhances the difference in brightness on them.
  7. Smoothing
  8. Noise suppression
  9. Data compression using the jpeg algorithm, usually with losses.

For a photographer, the main difference between raw and jpeg is that in the case of raw, you do all these conversions after shooting in a raw converter using a powerful computer processor, monitoring the result on a large monitor, and in the case of jpeg, you set these parameters in the scanty camera menu before filming. The camera is forced to process photos in a fraction of a second on its relatively weak processor. A RAW converter can use much more complex algorithms and not be so time-constrained, so you get better quality output.

In addition, when shooting, you may not have time/forget to set all these parameters correctly, you may make a mistake or simply not know what is best, since you do not see the result, as when working in a raw converter. If you try to change any of the listed parameters in a finished jpeg, in which a lot of information is irretrievably lost, this will lead to a sharp deterioration in image quality. If, after processing, the file is saved again in JPEG, which is often necessary, then additional information will be discarded, and new defects of jpeg compression will be superimposed on the old defects of jpeg compression.

Such a long answer to the first question, although I tried to make it as short as possible.

If I take a photo in raw and convert it to jpeg in lightroom, will it be better than jpeg straight from the camera?

The answer to the second question seems to be already obvious, but it all depends on how to process it. The camera processor, of course, is not as powerful as on a computer, but the most talented engineers, immensely devoted to the cause of their company, puzzled over it. They really tried to make it make a jpeg that would please the user with its brightness and colorfulness, and it’s not a fact that you can make the same even in a good raw converter. Yours will be better in terms of objective quality, but subjective quality is unknown.

However, if there is an error in the camera settings when shooting, you will definitely get a better result when shooting in raw. RAW will even forgive you for a two-stop exposure error.

You most likely already understood the answer to the third question: by sharpening in lightroom on a jpeg file, we increase the sharpness where it has already been enhanced, so it turns out sharper than in raw. The raw file in lightroom already has a certain value for the Sharpening and Nose Reduction parameters by default. On JPEG, all these sliders are set to zero by default, since all this is already done in the camera.

To be fair, we need to talk about the disadvantages of raw:

  • raw takes up more space than jpeg (but less than tiff). Fewer pictures fit on a memory card
  • serial shooting in raw is slower than in jpeg, since the “bottleneck” in the process is recording to the memory card
  • raw looks different in different converters or even in different versions of the same converter
  • To view raw you need special software