When an image is captured in a digital camera, it is recorded as raw data. If the camera format is set to JPEG, this raw data is processed and compressed before it is saved in the JPEG format. If the camera format is set to raw, no processing is applied, and therefore the file stores more tonal and color data. With more data stored in the file, there is more processing flexibility than a JPEG can offer. Here’s a cooking analogy: a raw file contains the ingredients to make a specific meal that you can prep however you’d like, whereas a JPEG is that meal already cooked, and there is less flexibility in how you can modify it.
A JPEG, even one that is straight out of the camera, has already been “developed” by the camera’s image processor. Settings such as brightness, contrast, color saturation, and even sharpening may have already been applied. The look of a JPEG image can be changed in an image editing application, but since it is a compressed format designed to yield smaller file sizes, a lot of tonal and color data has been permanently discarded during the compression process. The result is a file with far fewer potential tonal values than would be possible in a raw file of the same scene. For some images, this difference can be critical.
JPG vs Raw is very important in picture quality and appearances depending what the picture about or the intentions of the picture.