Read 16-bit McIdas images into I;16B mode to allow for memory mapping by radarhere · Pull Request #9046 · python-pillow/Pillow
Navigation Menu
- Notifications You must be signed in to change notification settings
- Fork 2.4k
Conversation
| # FIXME: add memory map support | |
| mode = "I" | |
| rawmode = "I;16B" |
This FIXME can be resolved by changing the mode to match the rawmode.
| # raw modes that may be memory mapped. NOTE: if you change this, you | |
| # may have to modify the stride calculation in map.c too! | |
| _MAPMODES = ("L", "P", "RGBX", "RGBA", "CMYK", "I;16", "I;16L", "I;16B") |
| if ( | |
| decoder_name == "raw" | |
| and isinstance(args, tuple) | |
| and len(args) >= 3 | |
| and args[0] == self.mode | |
| and args[0] in Image._MAPMODES | |
| ): | |
| try: | |
| # use mmap, if possible |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters