Skip to content

Incorrect GIF palette in frames after the first #5819

@sliva0

Description

@sliva0

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions