This method of the Device Class retrieves the device number of bits per pixel.
public int getBitsPerPixel();
Returns the bits per pixel.