diff --git a/PIL/XVThumbImagePlugin.py b/PIL/XVThumbImagePlugin.py index 7686b263d..a7d39ed89 100644 --- a/PIL/XVThumbImagePlugin.py +++ b/PIL/XVThumbImagePlugin.py @@ -18,7 +18,7 @@ # from . import Image, ImageFile, ImagePalette -from ._binary import o8 +from ._binary import i8, o8 __version__ = "0.1" @@ -58,7 +58,7 @@ class XVThumbImageFile(ImageFile.ImageFile): s = self.fp.readline() if not s: raise SyntaxError("Unexpected EOF reading XV thumbnail file") - if s[0] != b'#': + if i8(s[0]) != 35: # ie. when not a comment: '#' break # parse header line (already read)