style = {}
if iw > ih :
style['width'] = PICTURE_ITEM_SIZE
- style['height'] = PICTURE_ITEM_SIZE * float(ih) / iw
+ style['height'] = int(round(PICTURE_ITEM_SIZE * float(ih) / iw))
else :
style['heigth'] = PICTURE_ITEM_SIZE
- style['width'] = PICTURE_ITEM_SIZE * float(iw) / ih
+ style['width'] = int(round(PICTURE_ITEM_SIZE * float(iw) / ih))
img = basic.Image(img, style=style)
else :