The Digital Still Image
The digital image is a more than just a loose arrangement of pixels; to accurately represent an image it must have a resolution and colour depth. This document explains what makes a digital image and how to use the resolution and colour depth appropriately.
- Analogue to digital conversion
- Optical resolution and interpolated resolution
- How much resolution?
- Digital colour
It is important to remember that the images that we view on our monitors and in print are not normally digital images but analogue representations of the source digital image. A better way of thinking about digital images is as the 'score' rather than the 'performance' of the work. What we see, when we view an image on screen or in print will always reflect the qualities of the output device as much as the original digital image.
Most of the images that we view are in fact analogue and made up of an infinite range of reflected or transmitted light values. However the computer can't work in terms of light and must use a digital system of bits and bytes.
For this computers use binary.
The decimal counting system we use on a daily basis is termed base ten, binary systems are base two. In decimal counting a new column of figures is created each time a column is incremented beyond 9 i.e. 9, 10. So we see symbols ranging from 0 to 9 in the decimal system. However, in binary counting a new column is created each time a column is incremented beyond 1 i.e. 0, 1, 10. Hence the only symbols we see in the binary counting system are 1 and 0. A two digit number in base ten can represent 100 different values - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 . . . 99. A two digit binary number can represent four different values - 00, 01, 10, 11 (0, 1, 2, 3 in decimal).
Binary in computers
Binary is used in computers because computers are electronic and the simplest way to measure electricity is to test for the presence or the absence of a voltage. The presence of a voltage indicates one state (1 or 'on'), a lack of voltage indicates another state (0 or 'off'). This is the basis of a very reliable system of storing and processing data.
Bits and bytes
Each digit in binary is called a bit and each bit can take one of two values: 0 or 1. An eight-bit number such as 11011101 is called a byte. If each digit in the eight-bit number can take one of two values then it follows that there are 256 (28) different values that an eight-bit number can represent.
A thousand bytes (actually 1,024, or 210) make a kilobyte (KB), a million bytes (actually 1,048,576 or 220) make a megabyte (MB) and so on.
Most people have to convert binary numbers to base ten to understand what they represent. This takes a little practice but, as we shall see, there are a few numbers that are especially significant in digital imaging.
The number of values available is doubled each time a binary number's length is increased by one digit. Two bits can represent four values, three bits can represent eight values, four bits can represent 16 values, as in Table 1, and so on (remember that zero counts as a value).
Table 1. Binary counting system
Digital computers process binary data. If we want to process images within computers we have to extract information from the original analogue image and deliver it to a computer in binary form. This process is called digitisation. Digitisation of any analogue original is performed by a digital camera or scanner, these are both generically called 'capture' or 'input' devices.
A digital capture device provides a computer with a stream of binary data generated from brightness readings taken at regular intervals along both x and y axes of the original. The computer and software then reassemble this stream of data on the computer monitor and we see a picture that resembles the original. This process is illustrated in Diagram 1.
Diagram 1. An input device (scanner) provides a computer with binary data
Photographic images are said to be continuous tone or analogue. They contain a theoretically infinite number of colours and shades whose processing would exceed the capabilities of desktop computers.
Diagram 2a shows a continuous brightness curve with infinite values between black and white. It is theoretically possible to take a measurement from absolutely anywhere on the curve. The same curve is also shown in Diagram 2b after 'quantisation' into sixteen discrete levels. As we know, from Table 1, four bits can be used to represent sixteen values in binary. An image with this range of greys is termed a four-bit (24) image.
Diagram 2a. Continuous tone; Diagram 2b. Quantisation to 16 levels
The Black and White image
The simplest digital image to understand is the Black and White image that is made up of a range of brightness values between black and white.
How many grey values do we need?
Whilst relatively few shades of grey (as few as sixteen) will often suffice to represent the brightness information within a scene to the human vision system, it is more normal to use the standard 256 grey values (8-bit) that are output by most capture devices. The latest capture devices may even offer the ability to capture up to 65,536 grey values (16-bit). This offers superlative quality at the price of a larger file size and extra storage.
Diagram 3 shows the same black and white image scanned in three different 'modes'. The first mode uses just one bit to describe each sample, so only black and white samples are present. Four bits per sample are used in the second image giving sixteen different shades of grey to make the image from. This does not give a high quality image, note the 'banding' in the sky area. The third image uses eight bits to describe each sample. This allows each sample to take one of 256 possible grey values. The third image provides a better result than the previous two.
Diagram 3. Different 'grey levels'
Black and White (1 bit per pixel)
16 Greys (4 bits per pixel)
256 Greys (8 bits per pixel)
A 16-bit image will provide proportionally more quality and information than the other versions, and will be useful as an archive file for the subsequent creation of any surrogate images. However, this will not be reflected in any more quality within the printed image, which is unable to make use of this extra information.
What do the samples look like?
If you magnify a digital image in image processing software the individual samples become apparent. Each sample is a picture element, or pixel. The number of pixels in the image depends on decisions made about 'resolution' during the digitisation process. Diagram 4 shows an enlarged area from an 8 bits per pixel image. The individual pixels and their shades of grey are clearly visible.
Diagram 4. Picture elements (Pixels)
Resolution within digital imaging is a highly misunderstood topic. It should first be remembered that digital images themselves have no size other than the number of pixels that they contain. The image only has a 'real-world' size (inches or centimetres) when it is in an analogue form before digitisation or after output.
When digitising artworks, there are two types of resolution that need to be considered: Spatial resolution and colour resolution (bit depth).
Spatial resolution concerns the 'frequency' at which samples are taken, by the capture device, from the original artwork. This is most commonly expressed as spi (samples per inch) when scanning or ppi (pixels per inch) when working with a digital image.
Selecting a resolution for image capture will depend upon the proposed 'end use' of the digital image. Some uses, such as high quality printed material, require relatively high spatial resolution (giving large file sizes). Other uses, such as in Web graphics, may require much lower spatial resolution (and smaller file sizes).
Colour resolution (bit depth) concerns the number of colours, (or brightness in greyscale images), which are available to represent the colours (or shades of grey) in the original artwork. This figure is dependent on the length of the binary string used to describe the colour or brightness information in each sample.
Generally, with both Spatial Resolution and Colour Resolution the higher the figures are, (pixels per inch and bit depth), the higher the quality of the digital image obtained from the analogue original. In other words, the higher the ppi captured the more spatial information available and the larger the bit depth and the more accurate the colour.
Black and white photographs obviously do not have colour resolution. They have only levels of brightness that can be measured and given digital values.
Diagram 5. Increased spatial resolution and bit depth gives higher quality
4 colours (2 bits per pixel)
16 colours (4 bits)
16.7M colours (24 bits)
Scanners can be set up to capture in a range of different modes.
- Black and White or Line Art mode will provide an image with only black and white pixels. The image contains no intermediate greys. This mode requires only one bit of file storage space to describe each pixel.
- Greyscale or B&W Photo mode can produce, in addition to black and white, images with 254 intermediate greys between the black and white extremes (256 in total). This mode requires 8 bits to describe each pixel.
- 8-Bit Colour uses a palette containing 256 colours. The colours are contained in a LUT (look up table) that is produced when the image is converted from 24-bit colour. The most popular colours in the 24-bit image are kept in the 8-bit (containing 256 different colours) LUT and other colours are simulated by placing the appropriate coloured pixels next to each other. For example a pattern of red and yellow pixels will produce orange if viewed from a suitable distance. Another method is to use a predefined LUT, perhaps a 'Web-safe' palette, and use the nearest colours in the LUT to represent colours in the original.
- 24-Bit RGB Colour is the standard colour setting for most scanners. Each sample or pixel in a 24-bit image is composed of a red, green and blue component. '24-bit' and 'Trucolour' both use 8 bits to describe each of the red, blue and green components of each sample, giving 256 levels in each. This makes 24 bits in all to describe the colour information in each pixel and therefore allows a palette of nearly seventeen million colours (256 x 256 x 256 = 16,777,216).
- 32-Bit CMYK Colour is a scanning mode that is available on some older scanners used within the print industry. In this mode the image is captured within 24-Bit RGB colour (as above) and then internally transformed to the CMYK (Cyan, Magenta, Yellow, Black) colour space that is used by the print industry.
- 36- to 48-Bit RGB Colour captures images in an extended colour space using 36 bits or more per pixel. They must then be saved in a format that supports this level of colour depth (TIFF or PNG). This scanning mode offers extra quality at the expense of having a much larger file-size. However if the file is to be kept as a master archive image then this file gives the assurance of providing the complete source information available from that scanner.
Many modern CCD (Charge Coupled Device) scanners use 36 bits per pixel or more to scan or sample the original before outputting a 24-bit image. This is done to improve quality in areas of the scan corresponding to the darker areas of the original. The darker areas of images pose a problem for the CCD because of electrical 'noise' in the low signals from these areas, i.e. the shadow areas of a positive and the highlight areas of a negative original.
Traditionally, high quality scanning was the sole preserve of very expensive drum scanners. Recently a number of professional devices based on Charge Coupled Device or CCD technology have been introduced. See JISC Digital Media's advice document Scanners.
Inside a flatbed scanner will be found, in addition to cabling and circuit boards, an optical system, a linear CCD (Charge Coupled Device) array and a stepper motor.
- The CCD is the chip that reads samples from the artwork being scanned.
- The optical system and the number of photosites on the CCD provide us with the resolution specification of the scanner in one axis.
- The number of steps the stepper motor can make in a linear unit provide us with the resolution specification in the second axis.
A typical flatbed scanner may have an optical resolution specification of 1200 x 1200 samples per inch (spi). This means that the optical system and CCD partnership in the scanner can read 1200 samples per linear inch in one axis as the stepper motor steps along 1200 times per inch on the second axis of the scanning area.
Therefore a 1200 x 1200 dpi scanner can sample an image 1200 times in each linear inch and in each dimension i.e. 1,440,000 samples per square inch!
Many people prefer to use the more generic 'dpi' (dots per inch) rather than 'spi' (samples per inch), this is unfortunate as 'spi' is a more accurate and specific description of this unit of resolution.
Diagram 6. Exploded view of a flatbed scanner
Users of scanners should be aware that many manufacturers state the interpolated resolution of their scanners in literature and on packaging. To the unwary this can give a false impression of the scanners performance.
Interpolation is where estimated values are inserted between values which are optically read from the original artwork to create an image with a higher spi but with no further resolution of detail from the original.
Some scanners are specified as having twice the resolution on one axis than the other. The lower resolution normally specifies the size of each of the CCD's separate photo sites and the higher resolution is the smallest movement of the CCD (by the stepper motor) and is called the addressability. As pixels are square the lower figure should always be taken as an indicator of the true specification.
Highest resolution is not always better quality
Scanning at a higher resolution than necessary will take longer and produce files that require more storage space, greater processing time and cause network congestion. In the interest of efficiency the correct resolution for the intended use of the image should always be determined before scanning. Considering the use or anticipated use of the digital image will indicate the amount of resolution required.
'Good enough' technology
Different output sizes and different output devices will both affect the required resolution and therefore the created file sizes. Examples of output device would include a laser printer, a printing press or a computer monitor. A resolution should be chosen that provides a file that is 'good enough' for all anticipated uses to which the file is likely to be required for, but no more.
Higher resolution gives bigger files
The data generated from a scan is kept or 'saved' in a computer 'file'. Increasing the resolution provides more data and quickly leads to larger files. In fact, at a given colour resolution, doubling the spatial resolution quadruples the file size.
When is higher resolution useful?
In recent years computer storage has become less expensive and fast networks more affordable. Initiatives in education have encouraged the archiving of high resolution scans of various original materials.
For these projects, it is normal to digitise an image without knowing what the final output or size is going to be. In this case a high resolution 'Master Archive' image can be made that will hopefully provide enough information (file size) for a wide range of uses at a later date by re-sampling down to lower resolutions as needed.
This type of project requires very large amounts of well managed, secure computer storage space and networks, computers and application programs that can transport and process large files within an efficient workflow.
Current best practice guidelines say that original works should be captured and archived in the highest colour and spatial resolution allowed by a project's budget. It is important that this standard is 'good enough' to provide the information needed to create all images required by the project both in the present as well as into the future. This archival image, or a copy of it, can then be optimised to create a surrogate image for any form of output.
Choosing resolution for output devices
All output devices will need a certain amount of information to provide the best possible quality from that device (at any particular size). This is represented by the required 'Output Resolution' for that device.
Resolution for the Web
Many publications and even Web-delivered tutorials claim that the ideal resolution for Web graphics is 72 dpi. This is not necessarily so.
There is some confusion about how and why this assumption came about. It could be connected to the fact that the print industry uses a system of measurement based on points, of which there are 72 to an inch, and that the Apple computer company supplied 72 dpi monitors to desk top publishers to enable them to see an approximation of what would be seen in printed output (WYSIWYG - What you see is what you get).
However the belief that 72 dpi is the optimum resolution for Web graphics can quite easily be demonstrated as erroneous when applied to modern computers.
All personal computers now have configurable monitor systems. Monitors can easily be set to display a range of resolutions as long as they fall within the monitors' physical limits. Examples of these resolutions are 640 pixels by 480 pixels, 800 pixels by 600 pixels, 1280 pixels by 1024 pixels and higher.
Each pixel in a Web graphic will be mapped to a pixel on the screen unless the Web browser is instructed to do otherwise in the HTML code for the page.
Consider an image that is 200 pixels wide by 100 pixels in height displayed on a 15 inch monitor.
When the monitor resolution is set to 640 pixels wide × 480 pixels in height the image will display at about 3.5 inches across and 1.75 inches in height depending on the particular monitor.
The same monitor set to 1280 × 1024 will display the same image at about 1.75 across and less than an inch in height.
So, again, the output device must be considered when deciding on scanning resolution.
In many cases the Web user's monitor settings cannot be known. An image that will look acceptable on a range of settings should be created to ensure that sufficient information is communicated to every user.
A much used technique, which saves space on screen, is to display a small, low resolution copy of a graphic (thumbnail) in a Web page which is linked to a higher resolution copy. When a user clicks the thumbnail the larger, higher resolution image is displayed in the browser.
Resolution for offset lithographic printing
Offset lithography is the process used by professional print shops to print materials such as magazines, newspapers, brochures and publicity flyers.
Close inspection of printed matter, such as a black and white newspaper picture, shows that images are made from lines of dots with equidistant centres. The dots vary in size so that larger dots cover more substrate to reproduce darker areas of the original scene and smaller dots reproduce lighter areas. A common resolution figure for these lines of dots is 150 per inch and the term for this kind of output would be 150 lines per inch (lpi).
Professional reprographics departments use finely engineered machines called image setters to expose films from which printing plates are made. The process commonly uses a fine beam of light, or an infra red beam, to expose patches of film which are 1/2400 of an inch wide.
The film is exposed in such a manner as to make lines of 'half tone' dots. This is where a number of the finest 'marks' (1/2400 inch) the image setter can make are combined to make larger dots of different sizes.
The processed film, with its pattern of dots, is then brought into contact with a sensitised metal plate and Ultra Violet light is used to expose the plate through the film.
Development of the exposed plate brings up an etched image of the dot pattern.
The plate is then mounted on a printing press where ink is applied to the raised dots before being offset to a rubber sheet and then on to the final substrate, most commonly paper or card.
It can be calculated that 150 lines of half tone dots per inch, imaged on a 2400 dpi image setter will allow 256 dot sizes, and therefore 256 apparent shades of grey in the printed output. This calculation is made by squaring the result of dividing the image setter resolution (2400) by the chosen output resolution (150).
2400 dpi ÷ 150 lpi = 16 dots per 1/150 linear inch
16 × 16 = 256 greys (different sized half tone dots)
Diagram 7 shows a representation of a halftone dot as described in the above paragraphs. There are 256 small squares within the larger one. Each of the smaller squares represents the 1/2400 of an inch mark that an image setter can make. About 60 image setter 'marks' have been made in this larger 'cell'. They cover about 20% of the area of the cell. An area of printed material containing such dots would look light to medium grey to the human vision system.
Diagram 7. Construction of the halftone dot.
When producing image files for professional printing, the printer should be consulted about image resolution before capture (or resampling from an archived image) commences.
The scanning resolution is called 'input resolution' and the screen resolution is called 'output resolution' and the required dpi should be asked for.
There is a convention that two scanned dots should be allowed for each screen line so, if a document is being printed at 150 lines per inch it should be scanned at 300 samples per inch. Always check with your printer first.
Printing processes use subtractive colour mixing based around the subtractive colour primaries, cyan, magenta and yellow. All colours of the device's colour gamut can be created by mixing inks of these colours, although due to inadequacies within the ink it is normal to also use a further black ink, giving the printer a range of 4 inks (CMYK).
Resolution for inkjet printers
The offset lithographic process uses a constant frequency of dots and changes the size or amplitude of these dots to build up the differing tones and shades of colour in a process called 'amplitude modulation'. Inkjet printers uses a constant size of very small dot (sizes are optimistically quoted down to 2880dpi) and then vary the frequency of the dot to build up the colours, this process in called 'frequency modulation'. Using frequency modulation (also called Stochastic) printing allows these printers to use comparatively low amounts of image data to create images of visually very high quality with no visible half-toning screen. Just because the half-tone screen is not visible does not mean it is not there, it is merely hidden by the 'error diffusion' pattern used within this process.
Typically resolutions of 175-225 pixels per inch will provide ample information for good quality printing with these machines.
Resolution for continuous tone devices
Continuous tone printing devices provide true 'digital print' by actually printing a full range of colours within the colour space of the output device. This means that instead of building up colour by using a half-tone pattern of three colours they can print using all shades of tone and colour within the printers colour gamut.
This means that no additional data is needed to create the half-tone and also no dithering is needed to approximate the viewed colour. All image data and printing resolution is transferred directly into image quality.
Printers that use this process are both expensive and rare and developed mainly for the digital photographer. Most con-tone printers use dye-sublimation printing technologies to provide this quality. These printers are normally used to create high-quality one-off prints from digital image files.
Much confusion is caused by the over-use of the generic unit of resolution 'dpi'. It is always much better to use the correct unit, specific to use. Definitions of spi, lpi, ppi as well as the generic dpi can be found in the JISC Digital Media document Resolving the Units of Resolution.
First let us consider a practical experiment with light. If you were to take three torches and put a red filter over one, a green filter over the second and a blue filter over the third, then shone all three torches on to the same patch of a white wall there would appear on the wall a white patch of light.
If the amount of light emitted from the red torch were lessened, the patch of white light on the wall would start to turn cyan in colour. Likewise, if the other torches were varied in strength of emitted light the patch on the white wall would change colour.
Diagram 8. Representation of red, green and blue light demonstrating Additive Colour
Note: where the additive primaries (RGB) are mixed the subtractive primaries (CMY) are created and white is created in the middle where all colours have been added.
Colour in human vision
We have in the retina at the back of our eyes two types of photoreceptors, Rods and Cones. Rods are found throughout the retina and are not sensitive to colour and provide information at low light levels and around our peripheral vision. The Cones are used to perceive colour and are found concentrated in the central region of the retina. There are three kinds of cone, each of which is receptive within a different part of the colour spectrum, to red, green and blue light.
If our eyes can physically detect just three colours it follows that all other colours must be perceived in the human visual system via the interpretation of just red, green and blue light receptor signals. When all three receptor types are equally stimulated we see white or a neutral grey.
When one type is less stimulated than the other two we see light that is the opposite, or complimentary, colour. The colour circle in diagram 9 shows all hues of colour with on the opposite side of the circle their complimentary hue.
Diagram 9. A colour wheel
The digital colour image
We have seen that B&W images can be satisfactorily represented by 256 levels of grey - 8 bits of data describing each pixel. We also know that all colours can be made from mixing red, green and blue light.
It should therefore be possible to build up a colour image by first capturing the red, then the blue and green image data - using 8 bits of data for each colour channel.
This is exactly what both scanners and digital cameras do.
With early capture devices the whole capture process was repeated for each colour (channel) using an appropriately coloured filter in front of the CCD chip. This is called a '3-pass' scanner or 3-shot camera.
The 3-pass or 3-shot technology is now rare as cost reductions in CCD manufacture have brought about the possibility of including three CCDs in one, with red, green and blue filters built into them. This enables the complete RGB image to be obtained in one go. These are known as single-pass scanners and one-shot cameras.
The scanner or camera provides the computer with three (red, green and blue) 8-bit channels. Each channel holds information on how much light of that colour was reflected from the original. So the red channel would hold a lot of information about, say, a red apple but very little of the blue sea and sky. See Diagram 10.
Diagram 10. The Red Green and Blue channels and their combination
Colour on computer monitors (RGB)
Computer monitors use the additive colour system (see Diagram 8). Combinations or Red, Green and Blue light are used to describe a range of colours that is called the 'colour space' or 'gamut' of that monitor.
A magnified view of the surface of a computer monitor shows red, green and blue dots which, when varied in brightness and viewed from a suitable distance, combine to produce all the colours that the monitor can produce.
The most common configuration allows the brightness of each primary colour, or channel, to be varied over a range of 256 levels from zero to 255. This gives a range of over 16 million colours. If all are set at zero we see a black screen and if all are set at 255 we see a white screen. The full range of colours available (within gamut) is dependent upon the intensity and hue of the phosphors within the monitor's screen.
Colour in printing (CMYK)
Printing uses the subtractive colour system. The colours that we see are made by light that is reflected back from the ink/pigment that is used in the printed image. Rather than adding light until we have white, we subtract light until we have black. To do this, we use the opposite (or complimentary) hue to each of the additive primaries which then filters out light of the primary colour.
This means that we use the colours Cyan, Magenta and Yellow (opposites of R,G,B) to build up the whole of our available colour gamut. See Diagram 11.
However due to inpurities in the ink pigments used by printers, it is impossible to create a true black by overprinting all CMY inks and a further black ink is used instead of dense combinations of CMY. It is the black ink which gives us the 'K' in the familiar 'CMYK' printer inks.
In CMYK, values of colour are described by 'percentage-densities' of each ink. When there is a common level of ink across all three colours, they can be removed and replaced by a similar amount of black ink.
Diagram 11. Representation of cyan, magenta and yellow ink demonstrating Subtractive Colour
Note: Where the subtractive primaries (CMY) are mixed the additive primaries (RGB) are created and black is created in the middle where all colour has been taken away.