1. A method of compressing a digital representation of an image into a one-dimensional bitstream, the digital representation comprising a two-dimensional array of pixels wherein a primary color component and secondary color components are associated with each pixel, the method comprising: representing the image in a series of quality scales of progressively decreasing quality, wherein a higher quality scale comprises more data than a lower quality scale, and wherein lower quality scales are formed from higher quality scales by decreasing the number of stored color components or by decreasing the number of pixels; representing the image in terms of quality scales in terms of a base quality scale image and differential images wherein a differential image at a given quality scale is the difference between the image at the given quality scale and a representation of the image scaled up from a reconstructed representation at the adjacent lower quality scale, the reconstructed representation determined by a process comprising; transforming the image into a set of coefficients associated with known functions, quantizing the set of coefficients by dividing by quantization values and rounding to integer values, dequantizing the set of quantized coefficients by multiplying by the quantization values, and performing the inverse transform associated with the known functions to produce a reconstructed representation; representing the base quality scale image and the differential images as integer values by a process comprising transforming to a set of coefficients associated with known functions and quantizing the set of coefficients by dividing by quantization values and rounding to integer values; and encoding the integer values corresponding to the lowest quality scale and the differential images by a lossless ordered statistics encoding process to produce a one-dimensional bitstream.