Set bits per pixel correctly.