Use img.save("fileName.fileExtention"). You can see an example in the docs.
img.save("fileName.fileExtention")