Better checking for bit depth and conversion from color...