mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-11-27 22:11:10 +00:00
Update imageCompressor.py
This commit is contained in:
parent
4f28872971
commit
dcc9461d24
|
@ -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__":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user