ome / omero-figure

An OMERO.web app for creating Figures from images in OMERO
http://figure.openmicroscopy.org
GNU Affero General Public License v3.0
15 stars 30 forks source link

fix render_scaled_region for Pillow 4.2 #300

Closed will-moore closed 6 years ago

will-moore commented 6 years ago

This fixes this issue https://github.com/python-pillow/Pillow/issues/2609 reported by @pwalczysko using pillow==4.2.1.

To test, add a Big Image to figure and check that it renders OK.

pwalczysko commented 6 years ago

This change works for me on the localhost mac os x, with pillow 4.2.1 (installed using conda)

jburel commented 6 years ago

Has this been tested with other version of Pillow?

jburel commented 6 years ago

Does the problem only occur when generating a jpg?

will-moore commented 6 years ago

There's nowhere else in views.py or Export script that we're saving PIL image as JPEG, so nowhere else needs fixing. However, I made the same RGB change at views.py def default_thumbnail in case this changes to saving as JPG in future. Functionality is unchanged.

jburel commented 6 years ago

Thanks @will-moore