python-pillow / python-pillow/Pillow

Progress indication when writing multiple frames

Open
#7,433 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement
Dominant language
Python
Stars
13.8k
Forks
2.5k
Avg merge
2d 8h
Merged PRs (30d)
89

Description

Processing all frames of an animated image file (i.e. GIF, APNG, WebP) can take a while, and there's no indication of any sort for progress there, nor is there any way to keep track of it. Thus, I suggest adding to save_all implementation at least one of the following:

  • a log output (either at INFO or DEBUG level) after every frame (e.g. the way it's done by convert -verbose)
  • an (optional) custom progress tracking callback parameter (which should be given the current frame index and possibly total n_frames & filename of the first file as well); this can be used for customizing log output or for GUI progress indication
    • log only when no progress tracking callback is provided?
    • alternatively, if there's a callback and it returns a string, print it out as logging output?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the save_all implementation for animated image files and review how GIF, APNG, and WebP frames are written. Compare the proposed logging and callback approaches, including the available frame and filename information. Done means progress can be tracked during multi-frame saves with behavior covered by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, computer-vision
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.