Generic Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## bits-per-pixel

Arguments: object

Returns the number of bits that are used to represent each pixel of a pixmap or a window. Also known as the depth, the value may be 1, 4, 8, 16, 24, or 32. Depths of 16 bits or greater are known as "true color" because each pixel denotes a color value directly. (Sometimes 16 bits is referred to as "high color" rather than true color because only five bits are available for each of the red, green, and blue color components.) With depths of 8 and less, there are not enough bits to represent a color directly, so each pixel instead denotes an index into a table of colors. For a pixmap, this table is specified by the colors attribute. For a window, the table is specified by assigning a palette to the window, though a depth of 8 (for 256 colors) is generally the only one where the default system colors do not suffice.

Methods exist on `pixmap`, `texture`, `basic-pane`, and screen, though in Windows a single depth is used for the screen and all windows, according to the user's current Control Panel display setting. The depth of a pixmap does not need to match the depth of a window in which it is drawn, though the colors may not be correct when drawn in a window of a lower depth than the pixmap.

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version