android-gif-drawable icon indicating copy to clipboard operation
android-gif-drawable copied to clipboard

Add support animated WebP

Open eresid opened this issue 9 years ago • 24 comments

Like this: http://cloudinary.com/blog/animated_webp_how_to_convert_animated_gif_to_webp_and_save_up_to_90_bandwidth

eresid avatar Apr 10 '15 09:04 eresid

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.

franciscofranco avatar Feb 05 '16 03:02 franciscofranco

Yes, this issue is still open. I'll try to add WebP support ASAP but I can't promise when it would happen.

koral-- avatar Feb 05 '16 03:02 koral--

Draft of the solution:

  1. separate common code from GIF-specific one.
  2. use libwebp analogously to giflib.

koral-- avatar Feb 22 '16 02:02 koral--

Seems perfectly fine to me! Thank you so much. Make sure you set up a paypal donation link, you might be surprised!

franciscofranco avatar Mar 05 '16 00:03 franciscofranco

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.

franciscofranco avatar Aug 20 '16 03:08 franciscofranco

I'll try to start working on this feature soon.

koral-- avatar Aug 20 '16 12:08 koral--

Thank you - much appreciated.

franciscofranco avatar Aug 22 '16 15:08 franciscofranco

+1

edwardfoux avatar Sep 19 '16 07:09 edwardfoux

Work has finally started, progress can be tracked in webp branch.

koral-- avatar Nov 07 '16 00:11 koral--

@koral-- Did you finished the animated webp support? We tried fresco but the performance is not acceptable. Hope ur solution is perform better :>

lukewcn avatar Dec 26 '16 12:12 lukewcn

No, it is still in progress. I'll post info in this thread when this feature will be usable.

koral-- avatar Jan 01 '17 02:01 koral--

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.

koral-- avatar Jan 18 '17 03:01 koral--

Applause

franciscofranco avatar Jan 18 '17 19:01 franciscofranco

I checkouted webp branch and compiled failed……Can I use the lib to play WebP animation?

notice501 avatar Mar 15 '17 11:03 notice501

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-- avatar Mar 16 '17 00:03 koral--

@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.

simonzhexu avatar Sep 08 '17 17:09 simonzhexu

It seems that you didn't check out libwebp submodule. Here is the used revision: https://github.com/webmproject/libwebp/tree/16be192f4710fafe2f97687d929b00542d36bae2

koral-- avatar Sep 08 '17 17:09 koral--

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?

simonzhexu avatar Sep 08 '17 17:09 simonzhexu

The plan is to fully support animated WebPs like GIFs.

koral-- avatar Sep 14 '17 15:09 koral--

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?

AndroidDeveloperLB avatar Apr 20 '18 10:04 AndroidDeveloperLB

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.

koral-- avatar Apr 20 '18 15:04 koral--

Say, do you know of any official way to view them using existing API ?

AndroidDeveloperLB avatar Apr 21 '18 11:04 AndroidDeveloperLB

In this library there is nothing apart from WIP webp branch. In Android platform there is a AnimatedImageDrawable since version P preview.

koral-- avatar Apr 25 '18 21:04 koral--

animated WebP can be shown only from Android P, officially ?! What took them so long...

AndroidDeveloperLB avatar Apr 25 '18 21:04 AndroidDeveloperLB