We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I converted an I-mode PNG with values >255 to RGBA.
Conversion without truncation (converting to the lower available bit depth in RGBA mode), or at least a warning about truncation.
Values were silently truncated to 255
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.
The text was updated successfully, but these errors were encountered:
I'm going to say this is part of #3159.
Sorry, something went wrong.
No branches or pull requests
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.
The text was updated successfully, but these errors were encountered: