added save feature for image viewer