Camera Raw File Formats
Camera Raw image files are 'raw' in the sense that they are untouched and have not been altered since the photograph was taken. The raw file contains the image data as the camera recorded it. Each camera make uses their own version and will store the raw data in slightly different ways. For example Canon cameras have used 'CRW', 'CR2' and even 'TIF' as raw formats. Below is a brief description of how a typical Camera Raw file is constructed.
Figure 1 The pixels in a Camera Raw file come in groups of four so one of the prime colours has to be repeated, usually the Green.
Digital cameras use computer chips in place of traditional film, and are made up of millions of Red, Green and Blue light-sensitive cells which record the pixels. These are usually square and aligned in rows and columns, although some versions use different pixel shapes and row alignments instead. The colour cells naturally group into sets of four, but as there are only three primary colours of Red, Green and Blue, this means that one of these colours is repeated. The extra colour is normally the Green, which helps improve the overall image quality, resulting in a Red, Green, Blue and Green combination, or 'RGBG'.
NOTE: The total number of pixels that a digital camera can capture is quoted in millions, and referred to as 'Megapixels'.
Figure 2 Each pixel in a Camera Raw file only records one colour value, so technically the image is a Greyscale
The pixels in a Camera Raw file also store the colour data differently to those pixels in a processed image. Each light-sensitive cell is filtered so that it records only one of the prime colours, not all three. This means that each cell has only a Red value, OR a Green value, OR a Blue value. Technically then, the recorded Raw 'RGBG' image a Greyscale as each saved pixel has only one colour value each.
We can't view an image that is constructed this way as the colours would not make any sense to us. And yet we can still view the image in the screen at the back of the camera. This is acheived by the camera also recording a converted RGB JPEG file at the same time which is then installed inside the Camera Raw file. It is the JPEG version of the image that we view at the back of the camera.
When a Camera Raw file is converted to a standard RGB image, each pixel has to read data from its neighbours to calculate the full RGB set of three colour values. For example, a Raw Red pixel has only the Red value in it, so it has to interpolate the Green and Blue values from the surrounding Raw pixels that have Green and Blue values. Those Raw pixels in turn will borrow the Red values from the Red Raw pixels. The result is that each pixel changes from a single colour to a full RGB pixel with all three colours. The image will therefore triple in file size.
NOTE: The tripling in size is not exact as the Raw file also carries a JPEG image with it which is not included when the Raw data is converted. But as a general rule a 10-megapixel camera will deliver roughly 30Mb converted TIFF files.
The digital chip in the camera is not necessarily the same size and shape as the exposed image. Camera chips can have pixels that are 'wasted' as they lie beyond the image, so it is only those pixels that are exposed that count when determining the captured digital file size.
NOTE: Sometimes two figures are quoted for the total number of digital camera pixels: pixels and effective pixels. The higher pixels figure is technically correct as it refers to the whole camera chip. But it is the lower figure of effective pixels that matters here as this represents only those that can be exposed to the image. This is similar to the habit of quoting two figures for scanner resolution: optical and interpolated. It is the lower optical figure that is important as this is the limit that the scanner lens optics can detect.