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 opened a PNG "P" image and converted it to "PA" and "RGBA".
The alpha channel for every pixel is the same for the "PA" and "RGBA" conversion
The alpha channel in the "PA" image is different from the "RGBA" image
def output(bytes): return ''.join(['\\x%02x' % b for b in bytes]) assert Image.open("tiny.png").mode == "P" img_PA = Image.open("tiny.png").convert("PA") img_RGBA = Image.open("tiny.png").convert("RGBA") print(output(img_PA.tobytes()[slice(1, None, 2)])) # \x00\x00\xff\xff\x00\x00\xd0\xb7\x00\x00\x38\x00\x00\x00\x15\xc0 print(output(img_RGBA.tobytes()[slice(3, None, 4)])) # \x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\xff\xff
The tiny image used:
I added PR #6337 that should resolve the issue
The text was updated successfully, but these errors were encountered:
Thank you for reporting this and submitting a PR @RedShy 👍
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
What did you do?
I opened a PNG "P" image and converted it to "PA" and "RGBA".
What did you expect to happen?
The alpha channel for every pixel is the same for the "PA" and "RGBA" conversion
What actually happened?
The alpha channel in the "PA" image is different from the "RGBA" image
What are your OS, Python and Pillow versions?
The tiny image used:
I added PR #6337 that should resolve the issue
The text was updated successfully, but these errors were encountered: