Skip to content

Conversation

@radarhere
Copy link
Member

Helps #4830.

The issue reports that colours are not loaded correctly. This is happening for a 16-bit palette image.

http://paulbourke.net/dataformats/tga/

For 16 bits each colour component is stored as 5 bits and the remaining bit is a binary alpha value.

This is closer to BGR;15 (15-bit reversed true colour) than BGR;16 (16-bit reversed true colour), so this PR updates the palette mode, and with a call to convert(), the colours are seen correctly.

@radarhere radarhere changed the title Changed mode for 16-bit palette to BGR;15 Changed mode for TGA 16-bit palette to BGR;15 Apr 10, 2021
@radarhere radarhere added the Bug Any unexpected behavior, until confirmed feature. label Apr 16, 2021
@hugovk hugovk merged commit fc08a72 into python-pillow:master Apr 18, 2021
@radarhere radarhere deleted the mapdepth_16 branch April 18, 2021 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Any unexpected behavior, until confirmed feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants