mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-01 18:33:05 +03:00
Read 16-bit McIdas images into I;16B mode to allow for memory mapping (#9046)
This commit is contained in:
commit
a2fbd58f4b
Binary file not shown.
|
@ -27,6 +27,6 @@ def test_valid_file() -> None:
|
||||||
|
|
||||||
# Assert
|
# Assert
|
||||||
assert im.format == "MCIDAS"
|
assert im.format == "MCIDAS"
|
||||||
assert im.mode == "I"
|
assert im.mode == "I;16B"
|
||||||
assert im.size == (1800, 400)
|
assert im.size == (1800, 400)
|
||||||
assert_image_equal_tofile(im, saved_file)
|
assert_image_equal_tofile(im, saved_file)
|
||||||
|
|
|
@ -50,9 +50,7 @@ class McIdasImageFile(ImageFile.ImageFile):
|
||||||
if w[11] == 1:
|
if w[11] == 1:
|
||||||
mode = rawmode = "L"
|
mode = rawmode = "L"
|
||||||
elif w[11] == 2:
|
elif w[11] == 2:
|
||||||
# FIXME: add memory map support
|
mode = rawmode = "I;16B"
|
||||||
mode = "I"
|
|
||||||
rawmode = "I;16B"
|
|
||||||
elif w[11] == 4:
|
elif w[11] == 4:
|
||||||
# FIXME: add memory map support
|
# FIXME: add memory map support
|
||||||
mode = "I"
|
mode = "I"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user