Commit 22948535 authored by Yusei Tahara's avatar Yusei Tahara

convert digit string to int. (This is a temporary dirty fix)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21195 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fbbd5409
...@@ -457,6 +457,13 @@ class Image(File, OFSImage): ...@@ -457,6 +457,13 @@ class Image(File, OFSImage):
img_width, img_height = (self.getWidth(), self.getHeight()) img_width, img_height = (self.getWidth(), self.getHeight())
if img_width == 0: if img_width == 0:
return (0, 0) return (0, 0)
#XXX This is a temporary dirty fix!!!
width = int(width)
height = int(height)
img_width = int(img_width)
img_height = int(img_height)
if height > img_height * width / img_width: if height > img_height * width / img_width:
height = img_height * width / img_width height = img_height * width / img_width
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment