fixed get_image_resolution

master
idziubenko 3 years ago
parent 32a124add7
commit 08024bd6d4

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

Loading…
Cancel
Save