What did you do?
I converted an I-mode PNG with values >255 to RGBA.
What did you expect to happen?
Conversion without truncation (converting to the lower available bit depth in RGBA mode), or at least a warning about truncation.
What actually happened?
Values were silently truncated to 255
What are your OS, Python and Pillow versions?
- OS: arch linux
- Python: 3.7
- Pillow: 6.1
The attached example file comes from http://www.schaik.com/pngsuite/pngsuite_bas_png.html.

import PIL, numpy as np
np.asarray(PIL.Image.open("basn0g16.png").convert("RGBA"))
=> nearly all values (except the top right corner, which has value zero) were truncated to 255.
I appreciate that resampling may be too complex to be automatically performed, but at least truncation should not be silent.
What did you do?
I converted an I-mode PNG with values >255 to RGBA.
What did you expect to happen?
Conversion without truncation (converting to the lower available bit depth in RGBA mode), or at least a warning about truncation.
What actually happened?
Values were silently truncated to 255
What are your OS, Python and Pillow versions?
The attached example file comes from http://www.schaik.com/pngsuite/pngsuite_bas_png.html.
=> nearly all values (except the top right corner, which has value zero) were truncated to 255.
I appreciate that resampling may be too complex to be automatically performed, but at least truncation should not be silent.