mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 18:56:17 +03:00
[PIL] Image add support fromarray LA mode
fix: >>> img = np.zeros((40,40,2), 'uint8') >>> Image.fromarray(img) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1929, in fromarray raise TypeError("Cannot handle this data type") TypeError: Cannot handle this data type
This commit is contained in:
parent
72766b8f4e
commit
001bee40ab
|
@ -2215,6 +2215,7 @@ _fromarray_typemap = {
|
|||
((1, 1), ">f4"): ("F", "F;32BF"),
|
||||
((1, 1), "<f8"): ("F", "F;64F"),
|
||||
((1, 1), ">f8"): ("F", "F;64BF"),
|
||||
((1, 1, 2), "|u1"): ("LA", "LA"),
|
||||
((1, 1, 3), "|u1"): ("RGB", "RGB"),
|
||||
((1, 1, 4), "|u1"): ("RGBA", "RGBA"),
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user