Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

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

moving to 5.2.3 for consideration.
Few problems recently noticed depending on PILversion

https://trello.com/c/GA6e0awa/1-pillow-version

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)
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.63982 sec.)

We're Hiring!