From f13b335a60f996aeabe5482401dc875934051a55 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Tue, 21 Feb 2017 06:36:26 -0800 Subject: [PATCH] Py2.7 compatibility --- PIL/MspImagePlugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PIL/MspImagePlugin.py b/PIL/MspImagePlugin.py index 60a4f01f8..8f6e705ae 100644 --- a/PIL/MspImagePlugin.py +++ b/PIL/MspImagePlugin.py @@ -24,7 +24,7 @@ # See also: http://www.fileformat.info/format/mspaint/egff.htm from . import Image, ImageFile -from ._binary import i16le as i16, o16le as o16 +from ._binary import i16le as i16, o16le as o16, i8 import struct, io __version__ = "0.1" @@ -131,7 +131,7 @@ class MspDecoder(ImageFile.PyDecoder): (rowlen, x)) idx = 0 while idx < rowlen: - runtype = row[idx] + runtype = i8(row[idx]) idx += 1 if runtype == 0: (runcount, runval) = struct.unpack("Bc", row[idx:idx+2])