Automatically crop processed output image if very large

Fixes #42