Added a temporary hack to make the code actually output an image when requested. As yet, it isn't resized as requested. It just shows the error checking is working correctly.