Image cropping support

Support for image cropping.  Probably needs some follow up refactoring, but seems to work.

Let me know what you think of the approach.