I'm trying to write a code in python that is able to open an image in paint and save it with a different name of the original one.
My code is the follow:
import os
import subprocess
new_path='img.png'
path_img='./img.jpeg'
paintPath = os.path.splitdrive(os.path.expanduser("~"))[0]+r"\WINDOWS\system32\mspaint.exe"
subprocess.call([paintPath, path_img])
At this point, my image appears on Paint, but I would like automatically to save it and close the program, if it is possible. I didn't find any solution online.