Исправлено неправильное масштабирование картинки в настройках команд

develop 3.6.8.2
parent 0e64c766e0
commit 67a2f02c40

@ -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)

Loading…
Cancel
Save