Update imageCompressor.py

This commit is contained in:
priddhesh 2022-09-25 22:10:44 +05:30 committed by GitHub
parent 4f28872971
commit dcc9461d24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,8 +4,8 @@ import argparse
def compressImage(filename): def compressImage(filename):
img = Image.open(filename) img = Image.open(filename)
myHeight, myWidth = img.size Height, Width = img.size
img = img.resize((myHeight,myWidth), Image.ANTIALIAS) img = img.resize((Height,Width), Image.ANTIALIAS)
img.save("compressed-"+filename) img.save("compressed-"+filename)
if __name__ == "__main__": if __name__ == "__main__":