JPG to PNG converter code not working. Please help me with my code : I have used the below code to [![enter image description here][1]][1]convert JPG into PNG file:

But when i am running this code from the command line terminal using: python a.py "C:\Users\nishant.gupta2\PycharmProjects\jpgtopngconverter\photo" new



The system is giving me the error: PermissionError: [Errno 13] Permission denied: 'C:\\Users\\nishant.gupta2\\PycharmProjects\\jpgtopngconverter\\photo'

please help

My code is below:

import sys
import os
from PIL import Image
 
image_folder=sys.argv[1]
 
output_folder=sys.argv[2]
 
if not os.path.exists(output_folder):
    os.mkdir(output_folder)
 
 
for items in os.listdir(image_folder):
 
    im= Image.open(f'{image_folder}')
    im.save(f'{output_folder}.png','png')
 
 


  [1]: https://i.stack.imgur.com/CFpUL.png