Saves the image to a file. The file extension of Path will give the format of the saved image.
Supported formats are JPEG, PNG, BMP, GIF and XPM.
JPEG
PNG
BMP
GIF
XPM