Awesome-Python-Scripts
Awesome-Python-Scripts copied to clipboard
Image Compressor Python Script Defect
https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Image_Compressor
Please remove this script, or add some info that it's defect . There are many mistakes in this scripts and it simply doesn't work. Some examples are:
- The selected images throws a
AttributeError: 'tuple' object has no attribute 'seek'error. This is because one has to enumerate through every element of the tuple somewhat like this:
image_path_list = askopenfilenames()
for image_path in image_path_list:
img = Image.open(image_path)
- ANTIALIAS is misspelled. Instead of
PIL.Image.ANTILIAS, it should bePIL.Image.ANTIALIAS. Added to that it should be replaced withResampling.LANCZOS, becauseANTIALIASis deprecated and will be removed in Pillow 10 (2023-07-01)