From 08024bd6d41175ed218be29def0e723b054c3b99 Mon Sep 17 00:00:00 2001 From: idziubenko Date: Thu, 8 Jul 2021 17:36:11 +0300 Subject: [PATCH] fixed get_image_resolution --- pym/consolegui/application/more.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/consolegui/application/more.py b/pym/consolegui/application/more.py index 192b675..1539fd9 100644 --- a/pym/consolegui/application/more.py +++ b/pym/consolegui/application/more.py @@ -2696,7 +2696,7 @@ class ImageLabel(qt.QLabel): def get_image_resolution(source): identify = process(identify_cmd, "-format", "%w %h", source) if identify.success(): - swidth, _sep, sheight = identify.read().strip().partition(" ") + swidth, _sep, sheight = identify.read().decode(encoding="UTF-8").strip().partition(" ") if swidth.isdigit() and sheight.isdigit(): return int(swidth), int(sheight) return None, None