BUG: Divide by zero error in ImageItem autoDownsample

This commit is contained in:
Eric Dill 2015-07-11 17:43:07 -05:00
parent 1dc4c5c6d4
commit f929f40c51
1 changed files with 3 additions and 0 deletions

View File

@ -293,6 +293,9 @@ class ImageItem(GraphicsObject):
h = Point(y-o).length()
xds = max(1, int(1/w))
yds = max(1, int(1/h))
# xds = int(1/max(1,w))
# yds = int(1/max(1,h))
# 1/0
image = fn.downsample(self.image, xds, axis=0)
image = fn.downsample(image, yds, axis=1)
else: