Fix version detection.  Added bits per pixel support.

Signed-off-by: Moose517 <moose51789@gmail.com>