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.
What is this?
I added APNG support to ChunkyPNG.
You can decord/encord the Animated PNG file.
Also you can R/W access to the frame images's pixels like you do for the
ChunkyPNG::Canvas
.Low level access to APNG-specific chunks is also possible.
refs:
What did I do?
I made it possible for
ChunkyPNG::Chunk
module to parse acTL/fcTL/fdAT chunk types.And I added the following three classes.
ChunkyPNG::Animation
- class to represent APNG imagesChunkyPNG::Frame
- class to represent each frames that construct the animationChunkyPNG::AnimationDatastream
- represents the internal structure of an APNGUsage
I will show some samples.
Since APNG images are included, please view the following samples with APNG supported browsers (Safari/Firefox).
Read APNG file
input:
Modify and Export
input:
output:
Create animation from multiple images
input:
output:
Create animation from multiple images 2
In addition to above, prepare a default image for users of unsupported browsers.
input:
above 000-007.png and
output:
(left: supported browser, right: unsupported browser)
Create animation from single image
input:
output:
Who use this?
Uhmm... it's difficult.
However, as far as I know the following events have occured recently.
2 and 3 may not affect other than Japan.
LINE's market share is biased toward Japan (https://www.similarweb.com/blog/worldwide-messaging-apps , https://techcrunch.com/2012/12/04/global-messaging-market/).
CLIP STUDIO PAINT is made in Japan, many of the users will be Japanese.
Nevertheless, I expect that APNG will become widespread in the near future.
Finaly
I hope it will be the basis for discussion.
However, I know that you want to keep this library small.
So, even if this Pull-Request is rejected I will think your decision is reasonable and I will respect it.
Thank you.