Added function savePicture()