-
-
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
Drop our GIF support and integrate a 3rd party solution #945
Comments
@bpoplauschi sounds good to me. |
@mythodeia many thanks. I didn't know Mattt had such a library. Looks very good because it uses UIImage directly. Need to see how it performs. |
@bpoplauschi |
I would if I had the time :) I played with AnimatedGifImageSerialization and it has the same performance issue as our own code. They both work with very small GIF's, but that's it. :( I was hoping we could use Mattt's lib |
I've integerated YLGIFImage and it works well for me. But it seems this lib is no longer supported. FLAnimatedImage sounds like a good idea and they are considering change |
+1 for the general idea of replacing the GIF support by an external library. Based on your comment I would also prefer FLAnimatedImage. |
Note to self: look at https://github.com/kaiinui/KIChameleonView, it integrates SDWebImage with FLAnimatedImage. |
Guys, I've tried very hard to integrate FLAnimatedImage with our library, but because it's not a UIImage subclass, it involves too many changes and it breaks all the decoupling we have now. I have started integrating YLGIFImage instead. It works fine and it is easier to hook in. If FLAnimatedImage changes their implementation soon and subclass UIImage, we might turn this around, but from where I sit right now, I don't see a good way to integrate them with their current architecture. |
Seems like one contributor to |
The author of YLGIFImage has a project that combines SDWebImage and YLGIFImage. The author states that he plans to maintain this fork. |
Thanks @chenium |
When we will integrate a 3rd party solution for Gif? Thx! |
I modified the methods in file "UIImage+GIF" to return a "YLGIFImage", and modified the method in file"SDWebImageCompat" to do nothing with 'gif' data. It looks work well. |
@bpoplauschi FLAnimatedImage has an active UIImage subclass branch... |
Thanks @mythodeia, I will look at this again. |
No solution yet, I will look at the new FLAnimatedImage variant and take it from there. |
Any progress on this? |
the solution for https://github.com/liyong03/SDWebImage-YLGIFImage no longer works for current sdwebimage |
I modify some SDWebImage's source code. And work with FLAnimatedImage very well. |
I don't know if this is known but Brewer Herb gives a nice solution of using FLAnimatedImage with SDWebImage using swizzlling |
@yuvalDeri thx for the hint?! - but it actually does not animate the gif, it is loaded but does not run. using the following original sd method to load the image from web
|
@hjanuschka "+ (void)load { make sure you are calling It works for me, even the completion block holds a FLAnimatedImage instead of an UIImage when GIFs are involved. |
@yuvalDeri - MANY THX - changing the type from uiimageview to flanimatedimageview did the trick, also nice with the +load() thx - someone should do a POD of this |
Take a look at this -> https://gist.github.com/hilen/8ef4a810406051e8f0c1 |
By merging #1575 into the 4.x branch, I think we can close this thicket. Feel free to test it and let us know if it works. |
Hi @rs, @mythodeia ,
I think you both know our GIF support is pretty sucky (consumes a lot of memory #548 #538 and also blocks the main thread #933, doesn't work on disk retrieval #916). I've tried a few approaches, but none seems to fix it.
In #733 someone suggested we look at FLAnimatedImage a library developed by Flipboard. I also found YLGIFImage.
Now given those 2 libraries know their way with GIFs (low CPU and memory footprint), since they are already focused on GIF, making patches and maintaining their code, I strongly suggest we remove our GIF code and create a subspec that supports integration with one of them. Basically via CocoaPods, we will be referencing one of those 2 libraries.
Let me know if you agree with me so far.
Now deciding which one:
FLAnimatedImage
is not anUIImage
subclass, but aNSObject
subclass, which could make it harder for us to integrate.YLGIFImage
is aUIImage
subclass.If you agree with this, I can play with an integration. I think it's our best option.
The text was updated successfully, but these errors were encountered: