-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Improved reading 16-bit TGA images with colour #7965
Conversation
Actually, I missed it; "BGRA;15" is supported. |
While the test suite now passes, if you actually run with Image.open("Tests/images/p_16.tga") as im:
im.save("out.png") you get a transparent image. Looking at 'Color Map Specification' in https://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf, it says
I think setting the 16th bit to 0 actually means it is opaque, not transparent like Pillow is used to. I've created Yay295#20 to fix this. I've also updated the tests to compare with RGBA images to prevent this problem from slipping by again. |
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
Looks like a typo in the mode name. The only other place "BGR;5" is used is in
Unpack.c
where it's an alias for "BGR;15".The documentation I found says that it should actually be "BGRA;16" though, which isn't a mode we support.