From 4f2b984338279ffb2ef5ecde0f8e96612f629862 Mon Sep 17 00:00:00 2001 From: gnumaru Date: Fri, 13 Sep 2019 12:23:24 -0300 Subject: [PATCH] fixing bytes to int conversion when trying to get text layer flags --- gimpIOBase.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gimpIOBase.py b/gimpIOBase.py index 4f0f980..7c81cdf 100644 --- a/gimpIOBase.py +++ b/gimpIOBase.py @@ -413,7 +413,10 @@ def _propertyDecode_(self,propertyType,data): elif propertyType==self.PROP_VECTORS: self._vectorsDecode_(data) elif propertyType==self.PROP_TEXT_LAYER_FLAGS: - self.textLayerFlags=int(data) + if isinstance(data, bytes): + self.textLayerFlags=int.from_bytes(data, byteorder='big') + else: + self.textLayerFlags=int(data) elif propertyType==self.PROP_OLD_SAMPLE_POINTS: raise Exception("ERR: old sample points structure not supported") elif propertyType==self.PROP_LOCK_CONTENT: