searene / Anki-Addons

This repository is used to store all kinds of anki addons that I created
MIT License
24 stars 3 forks source link

Image Resizer: doesn't work with upper case image extensions #13

Closed Inaflean closed 6 years ago

Inaflean commented 6 years ago

Image Resizer does not work with upper case image extensions. If I try to use the program on an image called "test.jpg", it works perfectly. If I rename the file to "test.JPG", it no longer works. I believe this issue is why some people have been reporting the extension as not working.

I was able to correct the issue by adding uppercase extension names to the ImageResizer.py at line 200. This is part of "checkAndResize(mime, editor)". pic = ("jpg","JPG", "jpeg", "JPEG", "png", "PNG", "tif", "TIF", "tiff", "TIFF", "gif", "GIF", "svg", "SVG", "webp", "WEBP")

Let me know if you need any more info from me. Thanks!

searene commented 6 years ago

Hi Inaflean,

Thanks for reporting this issue and providing a solution! I'll fix this and try re-uploading it these days.

Regards, Searene

searene commented 6 years ago

Hi Inaflean,

It's fixed. You can reinstall and check if it works.

commit: c953220cd5cf24e85848c9d01c9857ff296878a2

Regards. Searene

Inaflean commented 6 years ago

Works great. Thanks!