From eba8f09fd5e1975c8e43f938adecb7c3a18d1c70 Mon Sep 17 00:00:00 2001 From: chriskiehl Date: Mon, 25 May 2015 16:48:43 -0400 Subject: [PATCH] removed dead code --- gooey/gui/imageutil.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/gooey/gui/imageutil.py b/gooey/gui/imageutil.py index 482014c..293cebd 100644 --- a/gooey/gui/imageutil.py +++ b/gooey/gui/imageutil.py @@ -22,23 +22,12 @@ def resize_bitmap(parent, _bitmap, target_height): image = wx.ImageFromBitmap(_bitmap) _width, _height = image.GetSize() if _height < target_height: - # print 'returning image without resizing' return wx.StaticBitmap(parent, -1, wx.BitmapFromImage(image)) - # print 'returning resized image' ratio = float(_width) / _height - image = image.Scale(target_height * ratio, target_height, - wx.IMAGE_QUALITY_HIGH - ) + image = image.Scale(target_height * ratio, target_height, wx.IMAGE_QUALITY_HIGH) return wx.StaticBitmap(parent, -1, wx.BitmapFromImage(image)) -def _GetTargetSize(size): - width, height = size - aspect_ratio = float(width) / height - tHeight = 79 - tWidth = int(tHeight * aspect_ratio) - return (tWidth, tHeight) - if __name__ == '__main__': pass