python-pillow / python-pillow/Pillow
Progress indication when writing multiple frames
Nobody has claimed this yet.
- 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
INFOorDEBUGlevel) after every frame (e.g. the way it's done byconvert -verbose) - an (optional) custom progress tracking callback parameter (which should be given the current frame index and possibly total
n_frames&filenameof 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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