Merged
Conversation
Contributor
Author
|
I've been doing some more testing and found a problem in the code for writing APNG sequences that occurs if it has to write multiple fdAT chunks in a row for one image frame. I'll try to get a fix and new tests pushed for that at some point in the next couple of days. |
radarhere
reviewed
Dec 25, 2019
hugovk
reviewed
Dec 27, 2019
hugovk
reviewed
Dec 27, 2019
Member
hugovk
left a comment
There was a problem hiding this comment.
Some minor docs suggestions. Please could you also add release notes, linking to the docs for more info?
radarhere
reviewed
Dec 28, 2019
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
b166e79 to
29954ce
Compare
See python-pillow#3483 Adds support for reading APNG files and seeking through frames, and adds basic support for writing APNG files.
Includes tests for reading and writing APNG files. The tests for reading files are based on the APNG browser compatibility tests from https://philip.html5.org/tests/apng/tests.html (which is linked in the Tests section of https://wiki.mozilla.org/APNG_Specification)
[ci skip]
[ci skip] Co-Authored-By: Andrew Murray <[email protected]>
- Add changes requested by hugovk
This was referenced Mar 17, 2021
Bump pillow from 4.0.0 to 7.1.0 in /study_material/intro-to-tensorflow
tiandiao123/deep_learning#121
Merged
Merged
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3483.
Changes proposed in this pull request:
Implements support for reading APNG files
seek()tell()can be used for accessing frames,seek()rewinding is supportedIDATchunks without anfcTLchunk),im.info["default_image"]will be set andTrue, and the default image can still be accessed as frame 0 (seek(0)).In this case, the first animation frame will be at
seek(1), andn_frameswill contain the number of frames plus 1 to account for the default image.im.info["default_image"]is not present or isFalseit means the APNG did not contain a separate default imageim.is_animatedwill always beTruefor APNG files, even if the animation only contains a single frame, to differentiate single frame APNG files from standard PNG files.Implements partial support for writing APNG files
save_allandappend_images(same behavior as writing GIF sequences)disposalandblendparametersappend_framessequence are expected to be the same size as the initial image, frame bounding box is calculated based on the differences between a given frame and the prior frameTests are based on the browser compatibility tests from https://philip.html5.org/tests/apng/tests.html, which are the only tests currently listed at: https://wiki.mozilla.org/APNG_Specification