Skip to content
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

Facebook patches for FLAnimatedImage #86

Closed
wants to merge 2 commits into from

Conversation

grp
Copy link

@grp grp commented Jul 20, 2015

A few months ago, I saw a tweet that Ryan Olson noticed that FLAnimatedImage was used in the Facebook apps. I've been working off-and-on since then to clean up the refactor and WebP support we'd done to contribute upstream, and it's finally ready now.

Since the version used in the Facebook app was branched almost a year ago, it was a little tricky to rebase onto master. I was only able to make it reasonable by rewriting the history, so this pull request has just two (relatively large) patches: one to make the image format support more pluggable, and one to add WebP support.

For both the patches, I decided to go with a multiple-target approach using subspec's rather than require pulling in libwebp for all uses of FLAnimatedImage. It's a little more complex, but it's closer to how we have it set up internally at Facebook and is more flexible for users.

Let me know if you have any questions. Most of the changes here were by @benhiller, I just cleaned them up for upstreaming, but we should both be able to answer questions on the approach or the code.

🚀

grp added 2 commits July 20, 2015 12:18
A number of refactors to make FLAnimatedImage more supporting of new
image formats. First, split the caching logic into its own object,
FLAnimatedImageFrameCache, so it can be shared between types. Next,
introduce an abstraction over the imate data, FLAnimatedImageData.
Finally, update the GIF support to be implemented as a plugin for
the core FLAnimatedImage library.
By default, WebP support is disabled. To enable, request the WebP subspec.
For local builds of FLAnimatedImage, you'll need a copy of libwebp in the
libwebp/ directory in the root of the repository.
@lxcid
Copy link

lxcid commented Jul 20, 2015

Wow!

@timonus
Copy link
Contributor

timonus commented Jul 20, 2015

😉

@timonus
Copy link
Contributor

timonus commented Nov 24, 2015

Hey there @grp and @benhiller, I'm working on reviewing this and I've run into a snag, looking for some help.

I've downloaded libwebp from here and added it to the root level of the project, but I'm getting build errors when trying to run the sample project.

screen shot 2015-11-24 at 9 09 47 am

Also, I'm seeing a set of warnings about libwebp being built for iOS 9.1 but the FLAnimatedImage sample project being build for iOS 7, which we still support.

screen shot 2015-11-24 at 9 12 24 am

It looks like this patch might refer to an older version of libwebp, can you guys help? Thanks!

@timonus
Copy link
Contributor

timonus commented Jan 12, 2016

I would love to merge this, but it and master have diverged quite a bit and it is effectively a rewrite of much of the core of FLAnimatedImage. I'm going to close it, but I wanted to thank you for your contributions. I'll direct people in need of WebP support to your fork.

@timonus timonus closed this Jan 12, 2016
@PhilCai1993
Copy link

You saved me!

@crespoxiao
Copy link

@PhilCai1993 now you can use BDImageView for animate webp 😀

@fahad01000
Copy link

جميل

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

Successfully merging this pull request may close these issues.

6 participants