Added a method to save changes to an image when called.