mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-30 18:03:07 +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 im.format == "MCIDAS"
|
||||
assert im.mode == "I"
|
||||
assert im.mode == "I;16B"
|
||||
assert im.size == (1800, 400)
|
||||
assert_image_equal_tofile(im, saved_file)
|
||||
|
|
|
@ -50,9 +50,7 @@ class McIdasImageFile(ImageFile.ImageFile):
|
|||
if w[11] == 1:
|
||||
mode = rawmode = "L"
|
||||
elif w[11] == 2:
|
||||
# FIXME: add memory map support
|
||||
mode = "I"
|
||||
rawmode = "I;16B"
|
||||
mode = rawmode = "I;16B"
|
||||
elif w[11] == 4:
|
||||
# FIXME: add memory map support
|
||||
mode = "I"
|
||||
|
|
Loading…
Reference in New Issue
Block a user