Added support for NChannelImage and ExtendToNChannel


Sorry for all the previous open/close pull requests. This is the only merge to look at.

Looks like this pull request is now out of date, restoring old code that we had meant to eliminate.  Maybe it would help to just pull in new changes to your fork, or maybe you'll need a new fork where you add in just the latest changes and abandon this complicated history of changes and comments...