Resizing images actually was broken, how nobody noticed I don't know.
Fix typo.
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.
More comments and fix undefined variables.
Merge pull request #392 from jgen/develop

Resizing images actually was broken, how nobody noticed I don't know.