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