[Image-SIG] Re: suspected bug in PIL 1.1.3 bmp reader
Jeff Breidenbach
jbreiden@parc.com
Tue, 13 May 2003 13:54:34 PDT
Following up on the suggested patch.
I tried the BmpReader patch below [1] supplied by Fredrik [2] to see
if it would fix a BMP reader problem [3]. Unfortunately it appeared to
have no effect, and the same error message occured namely "ValueError:
unknown raw mode."
I think I patched PIL correctly (I'm a Debian user, so I grabbed the
source for the package, patched it, rebuilt the .deb, and installed
it). However, I'm pretty new to Python/PIL so it's possible that
I missed something.
-Jeff
[1] http://mail.python.org/pipermail/image-sig/2003-April/002182.html
[2] http://www.jab.org/www/foo.bmp
[3] http://mail.python.org/pipermail/image-sig/2003-April/002200.html
--- original 2003-05-13 11:47:59.000000000 -0700
+++ BmpImagePlugin.py 2003-05-13 11:34:35.000000000 -0700
@@ -108,7 +108,7 @@
palette.append(rgb)
if greyscale:
if colors == 2:
- self.mode = "1"
+ self.mode = rawmode = "1"
else:
self.mode = rawmode = "L"
else: