mirror of
https://github.com/metafy-social/python-scripts.git
synced 2025-01-31 05:33:44 +00:00
Delete imageCompressor.py
This commit is contained in:
parent
39ca81cc2f
commit
7dd059f134
|
@ -1,16 +0,0 @@
|
||||||
from PIL import Image
|
|
||||||
from tkinter.filedialog import *
|
|
||||||
import argparse
|
|
||||||
|
|
||||||
def compressImage(filename):
|
|
||||||
img = Image.open(filename)
|
|
||||||
myHeight, myWidth = img.size
|
|
||||||
img = img.resize((myHeight,myWidth), Image.ANTIALIAS)
|
|
||||||
img.save("compressed-"+filename)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
parser.add_argument("img",type = str)
|
|
||||||
|
|
||||||
args = parser.parse_args()
|
|
||||||
compressImage(args.img)
|
|
Loading…
Reference in New Issue
Block a user