python pillow convert jpg to png

from PIL import Image

im1 = Image.open(r'C:\Users\Ron\Desktop\Test\autumn.jpg')
im1.save(r'C:\Users\Ron\Desktop\Test\new_autumn.png')

Here is what the above code is Doing:
1. Importing the Image module from the PIL package.
2. Opening the image using the open() function.
3. Saving the image using the save() function.
4. Changing the image format using the save() function.