Android encode animated webp - android

I tried many things so far, is here anyone who knows how I can encode a animated webp file?
I tried to rename a gif into a webp file (sometimes this helps) but that doesn't convert it. I need a real animated webp file.
Thanks in advance

Related

Animated WebP enecoder for Android

Are there any examples on how to encode animated WebP for Android,
or maybe someone was successful and can guide me through it?
I have a batch of webP images, and I want to create an animated one from them,
There is the libwebp library, however, it does not support animated webP, If I understood correctly from what I read, I need to use 'webpmux' and I have no idea how to integrate and use it.
I saw this post from 08/11, it's not relevant for me because I need to create an animated webP, not a single one.
Even if there is any GIF to webP library, that's good enough.
Thanks in advance, any help will be greatly appreciated!
Amongst its many capabilities, ffmpeg will encode a series of PNGs as a webp animation with alpha.
In this eample, files 0001.png to XXXX.png, where all the images are the same size.
ffmpeg -i %04d.png animation.webp

Picasso not loading JPG format

I'm getting some images from api and showing them via picasso library. Unfortunately it isn't showing .JPG formatted images while it perfectly works with jpg images. Is there anyone who had such problem? Is there any cure or we can't use picasso with JPG?
If I remember well, I had the same problem in general with android studio, so this doesn't regard strictly Picasso library. What I know is that in a case (.jpg) those files are recognized as multimedia files (so treated that way) in the opposite case (.JPG) they are considered as files and treated more generally.
Usually I convert all .PNG into .png and all .JPG into .jpg.
Hope it can help you!

GIF quality generated in Android

I am making an app that generates GIF from images taken on camera.
I have used two libraries to generate GIF, this one and this one, but both generate GIF with awful quality. Image is posterized.
For example, here is the original image:
and here is the image generated by Gifflen library:
There are some apps on Google Store that generate GIF and don't destroy image quality. Is there a way to increase GIF quality (generation time increase is ok) or is there another library that can generate GIF?
EDIT
Like Wildopper said in the comment, it is probably dithering of the image that is causing the problem. Here is the explanation on Wikipedia, but I don't know how to implement it.

How to show webp animation in Android

I would like to use WebP format to animate GIFs as the alternative to native GIF format or MP4, but I have no clue how to actually decode it in Android and show it in the view.
The Giphy app could be used as the reference. I would like to achieve similar result with the webp animation.
I found a 3rd party library - Fresco (Facebook). It provides a view for the animation as well as animates it. But this library increases the build size by several(!) megabytes.
Does anybody have a solution or suggestion how to display the animated WebP animation on native Android (not in WebView)?
Thanks in advance!
The "several" megabytes of Fresco become one megabyte if you ship separate APKs for different CPUs. See the instructions.

Picasso load image into GifImageView (android-gif-drawable library)

I am using the android-gif-drawable library to display an animated gif in an Android view. This library can load a file from an input stream, byte array, byte buffer, or from a locally stored file. I am looking for a way to use Picasso to download the gif and pass it to the library to load into the GifImageView. Unfortunately, once the downloaded image is converted to a Bitmap, it just becomes a single frame. I'm thinking a custom request handler might be able to hand off an input stream for the GifImageView to load, but I cannot seem to figure out the syntax to do this. Does anyone have pointers or thoughts on doing this?
If you haven't figured it out yet, you can use the library Ion. I was facing the same problem a few days ago, and it worked for me.

Categories

Resources