A raw image file contains minimally processed data from the image sensor of a digital camera or image scanner. Raw files are so named because they are not yet processed and ready to use by a bitmap graphics editor, printed, or displayed by a typical web browser. The image must be processed and converted to an RGB format such as TIFF or JPEG before it can be manipulated.
Benefits
Nearly all digital cameras can process the image from the sensor into a JPEG file using settings for white balance, color saturation, contrast, and sharpness that are either selected automatically or entered by the photographer before taking the picture. Cameras that support raw files save these settings in the file, but defer the processing. This results in an extra step for the photographer, so raw is normally only used when additional computer processing is intended. However, RAW permits much greater control than JPEG for several reasons:
Finer control is easier for the settings when a mouse and keyboard are available to set them. For example, the white point can be set to any value, not just discrete values like "daylight" or "incandescent". Setting the white point using on-camera controls may cause the user to miss a shot. Even with cameras that offer dedicated physical knobs and buttons, setting the whitepoint can feel frustrating. The settings can be previewed and tweaked to obtain the best quality image or desired effect. (With in-camera processing, the values must be set before the exposure). This is especially pertinent to the white balance setting since color casts can be difficult to correct after the conversion to RGB is done. Most camera raw files have a bit depth of 12 or 14 bits per channel instead of the 8 used by JPEG. This allows minor exposure errors to be corrected (usually 1~2 stops) and tonal changes to be made with less risk of posterization. (However, heavily overexposed areas are just as white with 12 bits as with 8, so using raw is not a substitute for correct exposure.) The working color space can be set to whatever is desired. For example the wide gamut Adobe RGB color space can be used instead of the sRGB color space set by most cameras. Different demosaicing algorithms can be used, not just the one coded into the camera.