– accounting for color temperature of the light that was used to take the photograph noise reduction – trading off detail for smoothness by removing small fluctuations color translation – converting from the camera native color space defined by the spectral sensitivities of the image sensor to an output color space (typically sRGB for JPEG) tone reproduction – the scene luminance captured by the camera sensors and stored in the raw file (with a dynamic range of typically 10 or more bits) needs to be rendered for pleasing effect and correct viewing on low-dynamic-range monitors or prints; the tone-reproduction rendering often includes separate tone mapping and gamma compression steps. compression – for example JPEG compression Demosaicing is only performed for CFA sensors; it is not required for 3CCD or Foveon X3 sensors. Cameras and image processing software may also perform additional processing to improve image quality, for example: removal of systematic noise – bias frame subtraction and flat-field correction dark frame subtraction optical correction – lens distortion, vignetting, chromatic aberration and color fringing correction contrast manipulation increasing visual acuity by unsharp masking dynamic range compression – lighten shadow regions without blowing out highlight regions When a camera saves a raw file it defers most of this processing; typically the only processing performed is the removal of defective pixels (the DNG specification requires that defective pixels be removed before creating the file). Some camera manufacturers do additional processing before saving raw files; for example, Nikon has been criticized by astrophotographers for applying noise reduction before saving the raw file. Some raw formats also allow nonlinear quantization. This nonlinearity allows the compression of the raw data without visible degradation of the image by removing invisible and irrelevant information from the image. Although noise is discarded this has nothing to do with (visible) noise reduction. 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 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