Python Automation Scripts You Should Know-Automatic Photo Compressor

PHOTO EMBED

Fri Feb 10 2023 16:49:27 GMT+0000 (Coordinated Universal Time)

Saved by @saimohan35 #python

import PIL
from PIL import Image
from tkinter.filedialog import *

fl=askopenfilenames()
img = Image.open(fl[0])
img.save("output.jpg", "JPEG", optimize = True, quality = 10)
content_copyCOPY

https://www.freecodecamp.org/news/python-automation-scripts/