Return a 0x0 image instead of crashing during resizing per #684, #685.
Don't crash on 0x0 templates, close #685.