android-gif-drawable
android-gif-drawable copied to clipboard
Add support animated WebP
Like this: http://cloudinary.com/blog/animated_webp_how_to_convert_animated_gif_to_webp_and_save_up_to_90_bandwidth
Hi @koral-- ! Is there any hope for WebP support in the future? I currently have to import the entire Fresco (https://github.com/facebook/fresco) to be able to read WebP's on my app. I know it's a lot to ask, but this would be very welcomed.
Thank you so much for developing this lib, I'm very grateful for it.
Yes, this issue is still open. I'll try to add WebP support ASAP but I can't promise when it would happen.
Draft of the solution:
- separate common code from GIF-specific one.
- use libwebp analogously to giflib.
Seems perfectly fine to me! Thank you so much. Make sure you set up a paypal donation link, you might be surprised!
Hi Koral! Thanks for all the work. Do you still have plans for this? You should set up a paypal donation link, I'm sure a lot of devs would gladly send you something as a thank-you if support for this gets added.
I'll try to start working on this feature soon.
Thank you - much appreciated.
+1
Work has finally started, progress can be tracked in webp branch.
@koral-- Did you finished the animated webp support? We tried fresco but the performance is not acceptable. Hope ur solution is perform better :>
No, it is still in progress. I'll post info in this thread when this feature will be usable.
OK, animated WebP demo (without connection with library API) on webp branch seems to be working. Next step is to integrate it with the library. I'll do to it ASAP. AAR size with libwep is ~3x larger, it will probably go to separate artifact.
I checkouted webp branch and compiled failed……Can I use the lib to play WebP animation?
webp branch HEAD contains currently work in progress and it is generaly not usable yet. At this commit: 221bbbc5bcf260b9548b4130cee9c3993ecf34e5 it should compile and there is very simple animated webp example. Remember to checkout libwebp submodule and keep in mind this bug in NDK r14: https://github.com/android-ndk/ndk/issues/314#issuecomment-284538680 (filter out MIPS or use different NDK version).
@koral-- what version of libwebp were you using? I am not able to compile due to missing files in libwebp that was listed in Android.mk file.
It seems that you didn't check out libwebp submodule. Here is the used revision: https://github.com/webmproject/libwebp/tree/16be192f4710fafe2f97687d929b00542d36bae2
I checked out libwebp, but I was using release 0.6.0, and they renamed a lot of file names, so compile was failing. But now it is working. Thanks for providing the exact commit that you used. And thank you for your work on this project. Is there anything else you plan to add or think should be added?
The plan is to fully support animated WebPs like GIFs.
Is it also possible to have API to convert between the two? Being able to open GIF, and convert to WebP, to save on how long it will take later to load it?
Is it also possible to have API to convert between the two
Sure, it is definitely possible. It is not something I plan to do in the near future but I will happily accept PRs with such feature.
Say, do you know of any official way to view them using existing API ?
In this library there is nothing apart from WIP webp branch. In Android platform there is a AnimatedImageDrawable
since version P preview.
animated WebP can be shown only from Android P, officially ?! What took them so long...