Skip to content

Conversation

@radarhere
Copy link
Member

Helps #4640

When saving an image as a GIF, the image passes through _normalize_mode, to convert the image to 1, L or P.

When saving a single RGBA image as a GIF, the transparency is currently lost. This PR fixes that by setting the "transparency" key in the info dictionary to the first transparent palette entry (if you think that might not be very effective, since there could be many different transparent palette entries, remember #5282).

@radarhere radarhere added the GIF label Nov 30, 2021
@radarhere radarhere changed the title When saving RGBA GIF, make use of first transparent palette entry When saving RGBA as GIF, make use of first transparent palette entry Nov 30, 2021
@radarhere radarhere changed the title When saving RGBA as GIF, make use of first transparent palette entry When saving RGBA to GIF, make use of first transparent palette entry Nov 30, 2021
@hugovk hugovk merged commit f560707 into python-pillow:main Dec 28, 2021
@radarhere radarhere deleted the saving_rgba_gif branch December 28, 2021 08:05
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.

2 participants