Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

Avoid creating an animated image for 1-frame GIFs #7

Closed
wants to merge 1 commit into from
Closed

Avoid creating an animated image for 1-frame GIFs #7

wants to merge 1 commit into from

Conversation

rsanchezsaez
Copy link
Contributor

When loading GIFs with just 1 frame the

 [UIImage animatedImageWithImages:duration:]

constructor was being used, and UIImage's images property was returning an array with only one element.

I think that when loading GIFs with just 1 frame they should load as regular non-animated images. I modified the code so that's the case.

Also added some test logs to check the images property values for 1-framed GIF and for a PNG file.

mattt pushed a commit that referenced this pull request Aug 13, 2014
Signed-off-by: Mattt Thompson <m@mattt.me>
@mattt
Copy link
Owner

mattt commented Aug 13, 2014

Thanks for your PR, @rsanchezsaez.

I applied a refactored version of the code in 0aad679, which is credited to you. I'll cut a new release once I'm finished going through the rest of the open issues.

@mattt mattt closed this Aug 13, 2014
@rsanchezsaez
Copy link
Contributor Author

Happy to help! :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants