New issue
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
Brightness clipped on I;16 images loaded from png #5967
Comments
Another workaround would be to create |
I've created PR #6112 to resolve this particular scenario, by fixing incorrect clipping when the "I" mode PNG was converted to match the "I;16" image you were pasting it on. However, Pillow will still clip the values of the 32-bit "I" mode when converting to the 16-bit "I;16" mode. This scenario is only fixed by my PR because you are using white. If you try this with other images, I expect you will find a problem. So resolving this situation more generally can be either part of #3796 or #3159. |
What did you do?
What did you expect to happen?
The pasted image should be kept the same
What actually happened?
The bright pixels got clipped to middle grey (32767 ?)
Proposed workaround?
Immediately after loading png, convert the image to array, then back to image again.
What are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: