Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Transfer all images to the program and get jpg images!
- #Everything is simple!
- from PIL import Image
- import sys,os
- if(len(sys.argv)>1):
- for i in range(1, len(sys.argv)):
- file=sys.argv[i]
- split_tup = os.path.splitext(file)
- file_name=split_tup[0]+".jpg"
- im=Image.open(file).convert("RGB")
- im.save(file_name,"jpeg")
- os.remove(file)
Advertisement
Add Comment
Please, Sign In to add comment