From d6c6dd4a88bb8406a4080079b033220784ca7b2f Mon Sep 17 00:00:00 2001 From: Brian Crowell Date: Tue, 23 Oct 2012 21:56:54 -0500 Subject: [PATCH] py3k: FIX: Bad upside-down check in BmpImagePlugin --- PIL/BmpImagePlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/BmpImagePlugin.py b/PIL/BmpImagePlugin.py index 465904e77..cbfd82ed8 100644 --- a/PIL/BmpImagePlugin.py +++ b/PIL/BmpImagePlugin.py @@ -91,7 +91,7 @@ class BmpImageFile(ImageFile.ImageFile): lutsize = 4 colors = i32(s[32:]) direction = -1 - if s[11] == '\xff': + if i8(s[11]) == 0xff: # upside-down storage self.size = self.size[0], 2**32 - self.size[1] direction = 0