Bit Depth
and
Estimating File Size

(With a passing reference to digital cameras)

Clive R. Haynes FRPS

File size and image quality is directly related.
Digital cameras have now rapidly become 'the norm' in photography. In view of this, one needs a ‘rule of thumb’ to indicate how good the image could be for the purpose intended.

It's established that an exhibition quality A3 size, ‘photo-realistic’, colour picture to be viewed at 'normal viewing distance' requires a file size of some 20 to 25mb. Such an image will contain around 7 to 9 million pixels.
A ‘photo-realistic’ A4 picture is around the 11mb size and contains some 3.5 to 4 million pixels to render similar image quality at a normal viewing distance.

It is advantageous to have a good working idea of what a particular relationship of pixels will produce as a file size. Often we see figures quoted such as 640 x 480 pixels or 1200 x 800 pixels and so on. The number of pixels in an image is absolute so in essence the more the better. Changing the number of pixels by ‘re-sampling’ is not desirable as it involves either ‘creating/inventing’ pixels or discarding pixels. There are some very clever resampling programs on the market, however there is nothing better than having the right quantity of pixels to begin with.

Where to start?

A greyscale (i.e. monochrome / black & white) image uses one ‘byte’ per pixel (a ‘byte’ being 8 ‘bits’).
An 8 bit unit or a ‘byte’, as it is called, can store up to 256 levels of information. In this way we can store up to 256 levels of brightness per pixel – which gives us an ‘8 bit greyscale’.

A colour image is made when each element of the ccd array, in the camera or scanner, samples the level of a particular primary colour - Red, Green or Blue (RGB). The resultant sampling combines the information to create one full colour pixel. This full colour pixel contains three bytes (each one 8mb in depth). Three bytes per pixel (RGB) are needed so 8 x 3 = 24 bits. For a given area therefore, a colour image needs three times the number of bytes compared to its greyscale equivalent.

So at one byte per colour, (remember, that’s 8 bits x 3 = 24 bits) we have what is termed ‘24 bit colour’ and is the typical ‘bit depth’ for realistic images.

A 24 bit RGB image has 8 bits per pixel for each of the R, G and B channels.

Bit Depth.

This is sometimes called ‘Pixel Depth’ or ‘Colour Depth’.

A pixel with a ‘bit depth’ of 1 has two possible values: black or white.
A pixel with a ‘bit depth’ of 8 has 28, or 256 possible values.
A pixel with a bit depth of 24 has 224, or approx. 16 million possible values.

The greater the ‘bit depth’ the finer the levels of change that can be recorded so the higher fidelity the gradations of the image. Naturally the equipment to perform this task this is more expensive and the resulting file size is correspondingly larger. As a consequence more space is needed in the computer system to handle and store the image. Depending upon scanning options, bit depth can be 24, 30, 36, 48 or even 64

Calculating File Size:
Simple calculation.

Multiply the total number of pixels by the number of 'bits' of colour (usually 24) and divide the result by 8 (because there are 8 'bits' in a 'byte').

e.g.

An image containing 1200 x 800 pxls

1200 x 800 = 960,000

= 960,000 pxls x 24 (usual ‘24 bit depth’ for a digital camera)

= 23,040,000 ÷ 8

= 2,880,000 or as we say 2.88mb

The above formula will provide a quick reference to estimating file size (and therefore a guide to resolution).

Note: the file format used to save the image information can change the figure calculated but not by a vast amount. Files can of course be 'compressed'.
So it's the 'expanded' or uncompressed file size that's really important.

How can the information be used as a guide?

To take an example: the same formula when applied to a colour slide (or neg) scanned into my Nikon Coolscan V When set to 2,700 ppi, it produces around 8,000,000 pixels (8 mega pixels) multiply by 24 and divide by 8 the answer is 24mb, which is about right for an image that will be acceptable as an A3 print.

Digital Cameras

Many excellent digital cameras are now available but be wary and be aware of resolution/file size for prints larger than, say, A4 (a lot depends upon content, your requirements and needs). Some cameras use clever methods of interpolation to raise the pixel level - look at the specifications carefully.

So as a rough guide, cameras at a realistic price with a specification of around 6 to 7mpxls can be considered the lower limit for acceptable A3 prints. The 6 or 7mgpxl image when 'uncompressed' expand to around 18mb.
For A4 prints, 3.5mpxls would be satisfactory - as this when 'uncompressed' expands to around 10mb.
However, remember that if the image is 'cropped' to remove extraneous material, pixels are also 'cropped' and the resulting file size is therefore reduced.

The upper range of 'consumer' digital cameras is now providing some excellent results.

'High end' consumer (SLR) models such as the Nikon D70, Canon EOS 300and Fuji S3 Pro will yield excellent results from a compressed 6mb file, expanding to some 18mb, which produces very acceptable prints of A3 size.
However many 'consumer' ‘megapixel’ models will struggle to produce quality images larger than A4 (a lot depends upon content, your requirements and needs). Never the less, I have seen excellent images produced by models producing around 4mpxl and upwards.
There is also a big difference in quality (and cost!) between 'consumer chips' and 'pro chips'.

Digital cameras produce texturally smooth and grain-free images, the result of which frequently looks better than scanned-in slides or negs with their inherent grain structure and surface blemishes.

Pro cameras such as the 'full frame' mega pixel SLR's are fantastic but at a price beyond the budget of most most techno-dedicated, enthusiastic amateurs (we're talking about £3,000 to £7,000 price tags here!) They are, after all, aimed at the 'professional photographer'.

What is acceptable is of course subjective and depends upon content and the purpose for which the image is intended.

Quality digital cameras (usually of the 'SLR' type) shoot RAW file format and this allows 16 bit working to carry through into 'Photoshop'. For more information about 'RAW' click on the link below.

 
Related Topics
File Size & Resolution
Scanning In
RAW Files
Know-How Contents
Homepage
e-mail CRHfoto