A camera raw image file contains minimally processed data from the image sensor of either a digital camera, a motion picture film scanner, or other image scanner. Raw files are named so because they are not yet processed and therefore are not ready to be printed or edited with a bitmap graphics editor. Normally, the image is processed by a raw converter in a wide-gamut internal color space where precise adjustments can be made before conversion to a "positive" file format such as TIFF or JPEG for storage, printing, or further manipulation. This often encodes the image in a device-dependent color space. There are dozens, if not hundreds, of raw formats in use by different models of digital equipment (like cameras or film scanners).
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 produce 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 has numerous advantages over JPEG such as:
Many more shades of colors compared to JPEG files - raw files have 12 or 14 bits of intensity information per channel (4096-16384 shades), compared to JPEG's gamma-compressed 8 bits (256 shades).
- Higher image quality. Because all the calculations (such as applying gamma correction, demosaicing, white balance, brightness, contrast, etc...) used to generate pixel values (in RGB format for most images) are performed in one step on the base data, the resultant pixel values will be more accurate and exhibit less posterization.
- Bypassing of undesired steps in the camera's processing, including sharpening and noise reduction
JPEG images are typically saved using a lossy compression format (though a lossless JPEG compression is now available). Raw formats typically use lossless compression or high-quality lossy compression.
- Finer control. Raw conversion software allows users to manipulate more parameters (such as lightness, white balance, hue, saturation, etc...) and do so with greater variability. For example, the white point can be set to any value, not just discrete preset values like "daylight" or "incandescent". Furthermore, the user can typically see a preview while adjusting these parameters.
- The color space can be set to whatever is desired.
- Different demosaicing algorithms can be used, not just the one coded into the camera.
The contents of raw files include more information, and potentially higher quality, than the converted results, in which the rendering parameters are fixed, the color gamut is clipped, and there may be quantization and compression artifacts.
- Large transformations of the data, such as increasing the exposure of a dramatically under-exposed photo, result in fewer visible artifacts when done from raw data than when done from already rendered image files. Raw data leave more scope for both corrections and artistic manipulations, without resulting in images with visible flaws such as posterization.
- All the changes made on a raw image file are non-destructive; that is, only the metadata that controls the rendering is changed to make different output versions, leaving the original data unchanged.
- To some extent, raw-format photography eliminates the need to use the HDRI technique, allowing a much better control over the mapping of the scene intensity range into the output tonal range, compared to the process of automatically mapping to JPEG or other 8-bit representation.