Skip to content

Conversation

@radarhere
Copy link
Member

Resolves #6027

At the moment, im.putpalette() only results in RGB palettes, discarding alpha information. The exception to this is when the mode is "RGBA", every 4th byte is extracted into info. However, that isn't a flexible way of retrieving alpha data, letting #6027 down when a user wants to retain alpha information from the more irregular "RGBA;15".

Instead, this PR changes putpalette() to create either RGB or RGBA palettes, moving the work of handling alpha data to Pillow's unpackers.

@hugovk hugovk merged commit f5a77fe into python-pillow:main Feb 15, 2022
@radarhere radarhere deleted the palette branch February 15, 2022 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Palettes with rawmode RGBA;15 don't work

2 participants