Add support for image dimensions

Adds support for issue #23