Computer generated images are typically made up of many different components or graphical elements which are rendered and composited together to create a final image. The compositing may be performed by special-purpose hardware, or by software running on a general or special-purpose computer system, such as a microprocessor inside a printer.
The bit depth at which compositing is performed limits the accuracy, or quality, of the final image. A bit depth of 8 bits per channel is commonly used in current renderers. For a renderer working in an RGBA color space, a bit depth of 8 implies that each channel (R, G, B, and A) of each pixel is limited to 256 discrete levels. When the pixel result of a compositing operation lies somewhere between two representable levels, the result is rounded to one level or the other.
In order to achieve greater accuracy of color data, some renderers have been designed to work at a higher bit depth, such as 16. However, 16 bit renderers are necessarily substantially slower than an 8 bit renderer. In a color space such as RGBA, compositing in bit depths greater than 8 provides only limited advantages over a bit depth of 8, especially if most or all objects to be rendered are initially represented in a bit depth of 8. In these cases, for a large part of typical images to be rendered, there is no advantage at all in higher bit depth rendering, and for the part where there is an advantage, the advantage is small. For this reason, the small advantage of increased accuracy is usually avoided in favor of maintaining the speed of the renderer.
Graphical content differs from image to image, and some images to be rendered may gain no benefit whatsoever from using a higher bit depth. One prior art approach examines the objects to be rendered, and renders the image in greyscale (that is, a single channel color space) if all objects to be rendered are greyscale, and in color (for example a three-channel color space such as RGB) if any objects to be rendered are not greyscale. This is effectively using triple the bit depth to render the image when the image contains any color. The disadvantage of this approach is its inflexibility. For an image which contains even a single pixel in color, where the rest of the page is black and white text, the whole page will be rendered using color compositing. Such color compositing is much slower than the greyscale compositing which would be performed if that single color pixel were absent.
A further prior art approach to compositing divides the image space into regions, and modifies the compositing expression for each region depending on the contributing objects, in order to optimize compositing. However, this approach does not teach methods of improving the quality of the composited image.