Skip to content
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

Incorrect GIF palette in frames after the first #5819

Closed
sliva0 opened this issue Nov 8, 2021 · 2 comments · Fixed by #5857
Closed

Incorrect GIF palette in frames after the first #5819

sliva0 opened this issue Nov 8, 2021 · 2 comments · Fixed by #5857
Labels

Comments

@sliva0
Copy link

sliva0 commented Nov 8, 2021

Code and Image

Image (ralsei.gif): ralsei

from PIL import Image

image = Image.open("ralsei.gif")
image.seek(4)
image.save("ralsei.png")

What did I expect to happen?

The script saves the fifth frame of the gif into a .png file.

What actually happened?

ralsei.png: ralsei
The script saves the fifth frame of the gif into a .png file, but without the yellow stars, in their place are completely transparent pixels. Possibly due to the fact that there is no yellow in the palette of the first frame.

OS, Python and Pillow versions:

  • OS: Windows 10 Pro 20H2
  • Python: 3.10.0
  • Pillow: 8.4.0

Also reproducible on:

  • OS: Manjaro Linux (arm)
  • Python: 3.9.7
  • Pillow: 8.4.0
@radarhere radarhere added the GIF label Nov 8, 2021
@SandaruKasa
Copy link

Can't reproduce it on Kubuntu 21.04 x86_64 with Python 3.9.5 and Pillow 8.1.2.
ralsei.png:8.1.2

But with Pillow 8.2.0 (and 8.3.2), the stars disappear and the background turns black.
8.2.0:8.2.0
8.3.2:8.3.2

With Pillow 8.4.0, however, the background is back to normal, but the stars are still missing.
8.4.0:8.4.0

@radarhere
Copy link
Member

I've created PR #5857 to resolve this.

ralsei

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 a pull request may close this issue.

3 participants