What did you do?
Open a 16-bit grayscale png and access its mode flag.
What did you expect to happen?
im.mode == 'I;16'
What actually happened?
im.mode == 'I'
What are your OS, Python and Pillow versions?
- OS: Ubuntu 18.04.2 LTS (Linux 4.15.0-47)
- Python: 3.6.7
- Pillow: 6.0.0
import numpy as np
from PIL import Image
ar = np.ones((32, 32), dtype=np.uint16)
im = Image.fromarray(ar)
im.save('foo.png')
im = Image.open('foo.png')
assert im.mode == 'I;16'
> file foo.png
foo.png: PNG image data, 32 x 32, 16-bit grayscale, non-interlaced
What did you do?
Open a 16-bit grayscale png and access its
modeflag.What did you expect to happen?
im.mode == 'I;16'What actually happened?
im.mode == 'I'What are your OS, Python and Pillow versions?
> file foo.png foo.png: PNG image data, 32 x 32, 16-bit grayscale, non-interlaced