Awesome-Python-Scripts icon indicating copy to clipboard operation
Awesome-Python-Scripts copied to clipboard

Image Compressor Python Script Defect

Open sidney-eliot opened this issue 3 years ago • 0 comments

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 be PIL.Image.ANTIALIAS. Added to that it should be replaced with Resampling.LANCZOS, because ANTIALIAS is deprecated and will be removed in Pillow 10 (2023-07-01)

sidney-eliot avatar Aug 11 '22 08:08 sidney-eliot