General considerations
Although raster images can vary massively in terms of source and use, there are a number of features which remain constant and should be considered when creating and using such files. As with many file types, it is practically impossible to specify a precise setting for these elements and these should be considered within the context of the wider project and used at a level which is fit for purpose.
Resolution
Resolution essentially describes the level of detail within an image expressed as a pixel count (e.g. pixels per inch (ppi) but also dots or samples per inch (ddi/spi)). The higher the resolution, the more detail is captured in an image and, consequently, the larger the file size. Image resolution is an important consideration for all raster images and an appropriate resolution should be chosen for the task at hand. As resolution increases so does file size so it is important to balance the level of details required from an image against the size of the files created.
Bit depth
In addition to the resolution of an image, bit depth (or colour depth) refers to the level of colour information used by each pixel. Images can range in bit depth from 2 bit (i.e. black and white) through to 8 bits (usually grayscale), and 24 bits (standard colour). As with resolutions, it is important to consider the bit depth in relation to the image being created and choose one that captures the information required whilst also minimising file size.
Colour space
Colour space should be considered in addition to bit depth and is used to refer to the colour system or model used in an image. Common models include RGB and CMYK for colour images and bitonal and grayscale form black and white and grayscale images. In addition to ensuring that the most appropriate system is used for the image, a key distinction exists between the RGB system, which is used primarily in images destined for on screen display and the CMYK system which is used in printing. The RGB system can hold more combinations of colours than the CMYK system so it is important to be aware that, when printing, RGB based images may not print accurately.
Compression
File format compression has been discussed briefly in the introductory chapter on ‘Planning for the Creation of Digital Data‘. In relation to images, compression falls into either lossless type file formats (available in GIF and PNG) or lossy formats (such as JPG) in which data is discarded. A number of formats, such as TIFF and PNG, also allow data to be stored without any compression. When creating data it is important to be aware of when compression is being used (e.g. within a camera when capturing a JPG image) and the level at which this is happening. Image compression is covered in detail in ‘Digital Preservation Guidance Note 5: Image Compression’ produced by The National Archives (UK) (Brown 2009).
Transparency
Image transparency, i.e. elements of an image which are transparent, is supported in most vector formats but in only a few raster formats (e.g. TIFF, PNG and GIF). Although a minor consideration, it is important to be aware that, where elements of an image have been made transparent (either through an alpha channel or a transparent colour), such functionality may not be supported in other formats or other stages of a particular workflow.
Image layering
The layering of components within an image is a common function of many popular graphics packages (e.g. Photoshop or Photo-Paint) but is not supported in raster file formats (the layers are conflated or merged from the top down). It is important to be aware that, when saving to a raster format, such layering will be lost.
Examples
The elements described above vary in significance depending on the type of raster image being created. For example, in the case of digital photographs, most modern cameras have the option to capture to either a raw (uncompressed) or JPG format at a range of resolutions. A decision must therefore be made by the creator as to what is most suitable for the subject. In addition, many cameras provide black and white or grayscale modes and a choice should be made as to whether these should be used at the point of capture or whether images are later converted to these modes via software. Digital cameras also generally produce images using RGB colour space so, if these are later to be incorporated into a publication, there are potential issues in reliably converting the files to CMYK format. Likewise, with document scanners, it is important to choose an appropriate resolution, bit depth and colour space for the dataset being generated. With many scanned files a later conversion is undertaken – e.g. conversion to PDF files – which often sees the data downsampled (i.e.the resolution is reduced). In such a case it is important the either the original files are both of a suitable resolution to allow such downsampling and that, where seen as significant, the original files are also maintained as the definitive versions.
In cases of data exported from vector applications (e.g. GIS or CAD screenshots) and original data created within applications such as Adobe Photoshop or Illustrator, it is often the case that such images – by virtue of being vector based – have no inherent resolution (or have varying resolution where raster files are layered). In these cases, creating a raster file will mean the fixing of the image at a set resolution and the loss of separate entities and layers in the resulting file. It is therefore important that a suitable resolution, dependant on the image’s intended use, is chosen for the output file and that, where possible, the original files follow a separate preservation path where the associated functionality is seen as being worth preserving.
When creating and working with images, users should be aware of the concept of ‘generation loss’ (see Planning for the Creation of Digital Data) in which image quality is gradually degraded through repeated editing and saving (and thus recompressing) of a lossy compressed image.