From 12d9b85db5f344731f55c5a21517f70c518d8596 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 20 Jun 2001 02:25:18 +0000 Subject: [PATCH] Better picture scaling svn: r168 --- gramps/src/HtmlDoc.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gramps/src/HtmlDoc.py b/gramps/src/HtmlDoc.py index 25640155a..7360f2541 100644 --- a/gramps/src/HtmlDoc.py +++ b/gramps/src/HtmlDoc.py @@ -237,16 +237,16 @@ class HtmlDoc(TextDoc): scale = float(nx)/float(ny) if scale > 1.0: scale = 1.0/scale - act_width = x - act_height = y * scale + act_width = float(x) + act_height = float(y * scale) else: - act_width = x * scale - act_height = y + act_width = float(x * scale) + act_height = float(y) - cmtopt = 72.0/2.54 - pixw = int(act_width*cmtopt) - pixx = int(act_height*cmtopt) - im.thumbnail((pixw,pixx)) + cmtopt = float(150.0/2.54) + pixx = int(act_width*cmtopt) + pixy = int(act_height*cmtopt) + im.thumbnail((pixx,pixy)) imdir = self.base + os.sep + "images" if not os.path.isdir(imdir): @@ -262,7 +262,7 @@ class HtmlDoc(TextDoc): return self.f.write('\n' % \ - (refname,pixw,pixx)) + (refname,pixx,pixy)) def start_table(self,name,style): self.tbl = self.table_styles[style]