mikeboers / Flask-Images

On-demand resizing of images for Flask applications.
https://mikeboers.github.io/Flask-Images/
BSD 3-Clause "New" or "Revised" License
81 stars 43 forks source link

Breaks with JPEG and Pillow>=4.2 #44

Open iurisilvio opened 7 years ago

iurisilvio commented 7 years ago

https://github.com/python-pillow/Pillow/issues/2609

My jpeg image is loaded with image.mode == 'L'. The resize function override this mode to RGBA and it breaks Pillow.

https://github.com/mikeboers/Flask-Images/blob/master/flask_images/core.py#L225

I just commented this mode override and it worked. I don't know why this mode change is there.