From 67a2f02c4086846dcf321c365b703c9912e0444f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Wed, 11 Nov 2020 17:25:51 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D0=BD=D0=B5=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=D1=8C=D0=BD=D0=BE=D0=B5=20=D0=BC=D0=B0=D1=81=D1=88=D1=82?= =?UTF-8?q?=D0=B0=D0=B1=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=BA=D0=B0=D1=80=D1=82=D0=B8=D0=BD=D0=BA=D0=B8=20=D0=B2=20?= =?UTF-8?q?=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9=D0=BA=D0=B0=D1=85=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/consolegui/application/more.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pym/consolegui/application/more.py b/pym/consolegui/application/more.py index 8f0983c..7b46698 100644 --- a/pym/consolegui/application/more.py +++ b/pym/consolegui/application/more.py @@ -2654,10 +2654,12 @@ class ImageLabel(qt.QLabel): convert_cmd = getProgPath('/usr/bin/convert') identify_cmd = getProgPath('/usr/bin/identify') def convert_image(source, res, target): - command = [convert_cmd, "-quality", "95", - source, "-resize", "%s^" % res, - "-strip", "-gravity", "center", - "-crop", "%s+0+0" % res, target] + command = [convert_cmd, "-quality", "100", + source, "-resize", "%s" % res, + "-strip", + target] + #"-strip", "-gravity", "center", + #"-crop", "%s+0+0" % res, target] convert = process(*command, stderr=STDOUT) if convert.success(): return True @@ -2674,7 +2676,7 @@ class ImageLabel(qt.QLabel): if cx and cy: if convert_image(source_path, "{}x{}".format(cx, height), output_path): - return (cx, cy) + return get_image_resolution(output_path) return None if len(list_data) == 3: @@ -2707,7 +2709,7 @@ class ImageLabel(qt.QLabel): style += "background-repeat: %s; " %repeat_dict[repeat.lower()] style += "border-bottom: 1px solid #B8B3B0;" self.setStyleSheet(style) - self.setFixedHeight(height_image) + self.setFixedHeight(sizes[1]) def get_view_params(client, method, step = None, expert = None, brief = None): view_params = create_obj(client, method)