Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- import os
- from PIL import Image
- def img2webp(rutaImagen):
- file, ext = os.path.splitext(rutaImagen)
- im = Image.open(rutaImagen).convert("RGBA")
- im.save(file + ".webp", "WEBP")
- img2webp(someFilename)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement