Bugfix for certain JPEG images that contain garbage after the EOI marker. Adds error handling in case rendering an image fails in PS interpreter.