Task #11325 (closed)
Opened 11 years ago
Closed 8 years ago
Bug: PIL image.resize() must take integers
Reported by: | wmoore | Owned by: | cblackburn |
---|---|---|---|
Priority: | major | Milestone: | OMERO-5.2.3 |
Component: | Scripting | Version: | 4.4.8 |
Keywords: | n.a. | Cc: | |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | n.a. |
Description
Noticed as part of https://github.com/will-moore/openmicroscopy/commit/46b66c19ac51dc2fe260cf0e35ab95a517596a25
Some versions of PIL will fail to image.resize(size) if size w & h are floats.
Make_Movie.py:
image = image.resize(map(lambda x: x*ratio, image.size), Image.ANTIALIAS)
Change History (5)
comment:1 Changed 11 years ago by cblackburn
- Owner changed from wmoore to cblackburn
- Status changed from new to accepted
comment:2 Changed 8 years ago by jamoore
- Milestone changed from 5.x to Unscheduled
comment:3 Changed 8 years ago by jburel
- Milestone changed from Unscheduled to OMERO-5.2.3
- Priority changed from minor to major
comment:4 Changed 8 years ago by jburel
Still a problem? this ticket is old.
comment:5 Changed 8 years ago by wmoore
- Resolution set to fixed
- Status changed from accepted to closed
PIL does still require integers for resize - see http://pillow.readthedocs.org/en/3.2.x/reference/Image.html#PIL.Image.Image.resize
but the line above has been fixed to use int():
image.resize(map(lambda x: int(x*ratio), image.size), Image.ANTIALIAS)
moving to 5.2.3 for consideration.
Few problems recently noticed depending on PILversion