Viewport tests - here's what I have so far.

Changed VIEWER_SIZE to ask the viewport for it, but I can't find how to get IMAGE_SIZE in a sensible way.