Added save to image file functionality.