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.
Related
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
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.
I am using the PanoramaGL to render some Spherical images in my App.
My images are more than 3000 pixels larger. I tried using PLSpherical2Panorama of PanoramaGL that supports 2048x2048 but the quality is not good.(I resized my images)
Then I split my panoramas into cubic images, each face got 1527x1527px. I edited the panoramaGL library to support cubic images of 2048x2048px(originally it supported only 1024x1024). The quality was better than spherical2, but yet was not what I expect, and the performance got horrible too.
A friend is making the same app for iOS and he used that library: https://bitbucket.org/javieralonso/japanoview
The result was perfect.
So, my question is: anyone knows any android library that renders spherical or cubic images and have the hotspot feature?
I have found PanoDroid(http://www.frank-durr.de/panodroid.html) that is a library to download Flickr images and transform them into a panorama image.
I had to change a lot of things in the library and just use her kernel, but the result was very good. Panodroid do a great job with big images.
But unfortunatelly Panodroid don't implement Hotspots. I will have to add this feature into the library.
--EDIT--
Frank Durr had transformed PanoDroid into a open source project.
Here is the link to his explanations: http://www.frank-durr.de/?p=26
And here is the link for the OpenPanoDroid: https://github.com/duerrfk/OpenPanodroid
You can also now use Google VR's VrPanoramaView
https://developers.google.com/vr/android/reference/com/google/vr/sdk/widgets/pano/VrPanoramaView
I would like to download a animated GIF file (more specifically, a weather radar loop), decompile it in frames and play the contents via AnimationDrawable.
The latter part and downloading the image is not a problem, but the middle part is puzzling me: how on earth can I extract the separate frames from the GIF within an app?
I found an easy to use GifDecoder that did the trick for me.
If I use a gif image instead of an xml file (< animation-list>), would I save processing to display an animation?
I have to build an application where the battery consumption is critical. So I have to search multiple issues like this.
Where can I find information related to this?
If you are talking about Animated GIF images these are not fully supported on Android.
Here is a link to a discussion about them (both native and browser display)
http://code.google.com/p/android/issues/detail?id=3422
In my testing the most efficient (CPU and battery) animations are stored in XML because they can be compiled and avoid on-demand parsing or other processing that would be required for a GIF or frame animation with drawables.