diff --git a/PIL/Image.py b/PIL/Image.py index fd96a797f..e6ae18517 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -2423,7 +2423,7 @@ def fromqpixmap(im): _fromarray_typemap = { # (shape, typestr) => mode, rawmode # first two members of shape are set to one - # ((1, 1), "|b1"): ("1", "1"), # broken + ((1, 1), "|b1"): ("1", "1;8"), ((1, 1), "|u1"): ("L", "L"), ((1, 1), "|i1"): ("I", "I;8"), ((1, 1), " 0 ? 255 : 0; + } +} + + /* Unpack to "L" image */ @@ -1168,6 +1181,7 @@ static struct { {"1", "1;I", 1, unpack1I}, {"1", "1;R", 1, unpack1R}, {"1", "1;IR", 1, unpack1IR}, + {"1", "1;8", 1, unpack18}, /* greyscale */ {"L", "L;2", 2, unpackL2},