Visitar URL original
If default conversion from P is RGB with transparency, convert to RGBA by radarhere · Pull Request #5594 · python-pillow/Pillow · GitHub
Skip to content

If default conversion from P is RGB with transparency, convert to RGBA - #5594

Merged
hugovk merged 1 commit into
python-pillow:masterfrom
radarhere:convert
Aug 6, 2021
Merged

hugovk merged 1 commit into
python-pillow:masterfrom
radarhere:convert

Conversation

@radarhere

@radarhere radarhere commented Jul 8, 2021 •

Copy link
Copy Markdown
Member

Helps #5593, fixing the first problem in that issue.

If calling convert() without specifying the mode on a P image, the mode chosen is either the palette mode or RGB.

This PR detects if the image has info["transparency"], and if it does, chooses RGBA instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants