SDAnimatedImage now supports static image like JPEG data#3626
Merged
dreampiggy merged 2 commits intoOct 21, 2023
Merged
Conversation
This previously will only return nil for static image, so this may be a behavior changes For example, SDAnimatedImageView loading url will cache the `SDAnimatedImage` instead of `UIImage`
dreampiggy
force-pushed
the
behavior/sdanimatedimage_jpeg_nonnil
branch
from
October 21, 2023 09:58
61c6a6a to
42f35ca
Compare
…le to coder as well This metadata information is important for some edge cases decoding
3 tasks
dreampiggy
commented
Oct 21, 2023
| // Animated Image | ||
| return [self initWithAnimatedCoder:animatedCoder scale:scale]; | ||
| } else { | ||
| // Static Image (Before 5.19 this code path return nil) |
3 tasks
8 tasks
8 tasks
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.
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 / refers to the following issues: ...
Behavior Changes
See: #3625 discussion about the old behavior
This previously will only return nil for static image, so this may be a behavior changes. Some user will forget to check the nil for SDAnimatedImage. So we make this more like the
YYImagelike object which return non-nil for static image.For example, SDAnimatedImageView loading url will cache the
SDAnimatedImageinstead ofUIImageCC @hstdt