Image Dimensions Fix

If the image has a valid width and height, use it. Otherwise, the
off-screen rendering creates an image that is the maximum size of the
browser window. This can be seen on with large images that are greater
than the size of the browser window.