Large image (rebased onto develop)



This is the same as gh-696 but rebased onto develop.

----

Fix issues noticed when the image has no pixels.