.bitsperpixel R/O Property
Function: |
Returns the number of bits available for each pixel of the currently selected controller/panel. |
Type: |
Byte |
Value Range: |
Value depends on the currently selected controller/panel |
See Also: |
Understanding Controller Properties, Working With Pixels and Colors |
Details
Controller/panel selection is made through the Customize Project dialog, accessible through the Project Settings dialog.
For monochrome controllers/panels (see lcd.paneltype), lcd.bitsperpixel will return 1; that is, the pixel can only be on or off. For grayscale panels, this value will be > 1, which indicates that each pixel can be set to a number of brightness levels. For example, if lcd.bitsperpixel = 4, then each pixel's brightness can be adjusted in 16 steps.
For color panels, this property reflects the combined number of red, green, and blue bits available for each pixel (see lcd.redbits, lcd.greenbits, and lcd.bluebits).
The number of bits per pixel affects how lcd.forecolor, lcd.backcolor, and lcd.setpixel are interpreted. Also, the output produced by lcd.bmp depends on this property.