Skip to content

ValueError: images do not match #7777

@alanhamlett

Description

@alanhamlett

Without changing code, only upgrading from 10.1.0 to 10.2.0, started getting this error when generating animated GIFs:

  File "wakatime/insights/utils.py", line 481, in get_animated_insight
    images[0].save(out, format="gif", append_images=images[1:-1], save_all=True, duration=80, loop=0)
  File "venv/lib/python3.10/site-packages/PIL/Image.py", line 2439, in save
    save_handler(self, fp, filename)
  File "venv/lib/python3.10/site-packages/PIL/GifImagePlugin.py", line 704, in _save_all
    _save(im, fp, filename, save_all=True)
  File "venv/lib/python3.10/site-packages/PIL/GifImagePlugin.py", line 715, in _save
    if not save_all or not _write_multiple_frames(im, fp, palette):
  File "venv/lib/python3.10/site-packages/PIL/GifImagePlugin.py", line 671, in _write_multiple_frames
    diff_frame.paste(fill, mask=ImageOps.invert(mask))
  File "venv/lib/python3.10/site-packages/PIL/Image.py", line 1738, in paste
    self.im.paste(im, box, mask.im)
ValueError: images do not match
  • OS: Linux
  • Python: Python 3.10.12
  • Pillow: pillow==10.2.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