simple save-method for different formats of image