Remove duplicate code.
Fix warning generated when an image doesn't have bits or channel info (and use sane defaults).
Slight re-word of the exception error message.