Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/atoidejouer/tools/image.py
diff options
context:
space:
mode:
Diffstat (limited to 'atoidejouer/tools/image.py')
-rw-r--r--atoidejouer/tools/image.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/atoidejouer/tools/image.py b/atoidejouer/tools/image.py
index 89314dd..ada3bdd 100644
--- a/atoidejouer/tools/image.py
+++ b/atoidejouer/tools/image.py
@@ -69,7 +69,7 @@ def get_sequence_first_graphic(type_, sequence_name, size=None):
def compute_width_height(width, height, max_width, max_height, use_max=False):
# compute ratio
_ratio_scr = max_width / float(max_height)
- _ratio_img = width / float(height)
+ _ratio_img = 0 if not height else width / float(height)
if width > max_width\
or height > max_height:
if _ratio_img > _ratio_scr: