-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add APNG coder support #2149
Add APNG coder support #2149
Conversation
Codecov Report
@@ Coverage Diff @@
## 5.x #2149 +/- ##
=========================================
- Coverage 74.63% 73.7% -0.94%
=========================================
Files 50 51 +1
Lines 6372 6613 +241
Branches 575 597 +22
=========================================
+ Hits 4756 4874 +118
- Misses 1558 1681 +123
Partials 58 58
Continue to review full report at Codecov.
|
2a68813
to
d884e38
Compare
d884e38
to
1670af9
Compare
1681346
to
0fa6e88
Compare
…cOS's SDAnimatedImageRep
e09f3ba
to
5da5ec9
Compare
Merged. This is actual a separate component of image decoding and have no conflict with current codebase. I test with iOS & macOS image and it works. |
01a28f8
to
915278b
Compare
@dreampiggy is this the same coder from https://github.com/SDWebImage/SDWebImageAPNGCoder? If so, we can do some dependency management to avoid duplicating the code |
@bpoplauschi Yes..Nearlly the same for the You're right, maybe dependency management is better than current subspec management. But however, I think why we need another cocoapods may because that feature (Like WebP coder, or MapKit) need another dependency which is no need for Core Lib. Since APNG support is done by Apple from Image/IO framework, which is already the main dependency for SDWebImage. It contains the same dependency level as GIF coder. I think separating For current that SDWebImageAPNGCoder. Maybe the best way is to close it or mark it as deprecated. |
I see. Basically on the 5.x branch is a more rich version of the APNG coder. OK |
New Pull Request Checklist
I have read and understood the CONTRIBUTING guide
I have read the Documentation
I have searched for a similar pull request in the project and found none
I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)
I have added the required tests to prove the fix/feature I am adding
I have updated the documentation (if necessary)
I have run the tests and they pass
I have run the lint and it passes (
pod lib lint
)This merge request fixes / reffers to the following issues: #1060
Pull Request Description
This PR add the build-in support for APNG image format. See here: https://en.wikipedia.org/wiki/APNG
For static PNG image, it can decode the first frame. For APNG image, it can decode the animated image.
This coder conform to
SDWebImageProgressiveCoder
, which means you can do incremental image loading for APNG frames.This coder also conform to
SDAnimatedImageCoder
protocol and can be intergrate inSDAnimatedImageView
to support big APNG rendering.This PR is based on the animated coder refactor branch. So if that branch is merged firstly, the diff may looks more clear.Refactor branch merged