Convert images to JPEG format

import os
import sys
from PIL import Image

if len(sys.argv) > 1:
if os.path.exists(sys.argv[1]):
im =[1])
target_name = sys.argv[1] + “.jpg”
rgb_im = im.convert(‘RGB’)
print(“Saved as " + target_name)
print(sys.argv[1] + " not found”)
print(“Usage: ”)

Do you have a question about the code? Did you encounter a problem? Or are you just trying to share some work?

If you want to share your code then share it within three back-ticks
For example: ``` then your code ```