glide icon indicating copy to clipboard operation
glide copied to clipboard

Support of WebP format (incl. animations) where not natively available

Open EugineKidoz opened this issue 9 years ago • 28 comments

Will be very great if you will add a support for WebP format. Witch includes loading WebP images and playing the animations.. Like the Fresco library does.

To add support of loading images shouldn't be hard.. the challenge is to add animation playing support.

Tnx.

EugineKidoz avatar Aug 06 '15 09:08 EugineKidoz

Yes please provide an easy way to display webP animations it will be very appreciated!

Sheepment avatar Aug 09 '15 14:08 Sheepment

WebP images are supported via the Android framework 4.2.1+, see https://developer.android.com/guide/appendix/media-formats.html#core. Be careful, between 4.0 and 4.2.1 transparent or lossless images won't load. WebP animations are not supported by the framework; it would require native code. As usual, pull requests here would be welcome, probably best to have an integration library for this.

sjudd avatar Aug 15 '15 17:08 sjudd

想要使用webp格式,但glide不支持,自己写一套工具,发现很多坑,请求Glide的大神们快点支持webp

Want to use webp format, but glide does not support their own writing a set of tools and found a lot of pit, the request Glide the gods who quickly support webp -- Google Translate

zlkevinet avatar Aug 27 '15 09:08 zlkevinet

哈哈,楼上的不说英语,大神怕是看不懂啊

haha, do not speaking Chinese, somebody may not understand what you say

start141 avatar Aug 27 '15 09:08 start141

Rambling about Chinese in an English forum (kept to preserve history, not related to issue) @JimmyET Google translate only produces readable text if the sentences are simple, they also need to be grammatically correct and even then it mostly works only between latin languages in my experience. For example they can't contain literal names like "Glide" or tech words, like "webp"; because it's hard to figure out for an AI what they represent in a sentence. According to it you said:

Webp format you want to use, but does not support glide, write your own set of tools and found that many pit, Glide's request Great God who quickly support webp

@start141 replied:

Haha, upstairs do not speak English, do not understand the big fear is God ah

I don't really understand how "God" comes into picture when talking about image formats. Different word order in grammar of English and Chinese also produces kind of Yodaspeak. All in all the translated text sounds more like an really artsy poem than tech talk.

Please make your best effort to write comments in English here (and any other forum where you only see English entries by others), otherwise you're likely to have problems communicating your views. Worst case you can ask a friend to help translate if you don't speak English. Thank you for understanding! (I'm not a native English speaker either.)

TWiStErRob avatar Aug 27 '15 21:08 TWiStErRob

+1 it looks like we really need to make it supporting webp as it has amazing data size advantage for mobile data. I have found a list of native supporting library for Webp format @TWiStErRob @bumpserver @sjudd

jjhesk avatar Apr 08 '16 04:04 jjhesk

@TWiStErRob 棒棒哒

tmxdyf avatar Apr 15 '16 08:04 tmxdyf

Can 4.x display WebP image from internet?

googolmo avatar May 12 '17 02:05 googolmo

@googolmo yes, Glide v3 and v4 both support WebP (as long as the underlying device can decode it) For Android 4.x support see https://github.com/bumptech/glide/issues/571#issuecomment-131404236

TWiStErRob avatar May 12 '17 08:05 TWiStErRob

two years passed, this feature still a feature

SuSuWoYaYa avatar Sep 20 '17 08:09 SuSuWoYaYa

It probably involves native code, or at least packaging an external webp library. A pull request is welcome for this to create an integration library to handle this.

TWiStErRob avatar Sep 20 '17 08:09 TWiStErRob

There are integration libraries for both decoding webp images and animated webp images. I've seen various open and closed source implementations, though unfortunately I haven't seen one that's suitable to use here directly.

For animated webp images in particular, the good news is that the AOSP framesequence library seems to offer a plausible way forward. I'm making progress on this front, although relatively slowly. I'll try and provide a more detailed update in the near future.

sjudd avatar Nov 14 '17 05:11 sjudd

I‘m confused why the owner lead us to this issue.It‘s opened in 2015, and does not close now.Any way, does anybody here has an experience of using fresco to decode animated webp, works with glide? It really sucks to have 2 image library in one project.

Whoisurdady avatar Nov 20 '17 11:11 Whoisurdady

#2765 seems related.

sjudd avatar Dec 27 '17 19:12 sjudd

I have written a glide integration webp library to support playing animated webp images, see GlideWebpDecoder. This is based on libwebp project and some code from Fresco project. Transparent or lossless static-webp images below 4.2.1 will be support after certain tests soon. Feel free to try for supporting webps and improve the project, thanks.

zjupure avatar Dec 30 '17 07:12 zjupure

@zjupure GlideWebpDecoder library is really useful. Anybody else want load animated webp, can use GlideWebpDecode. I have tried.

meikaiss avatar Jan 26 '18 09:01 meikaiss

@zjupure which version of glide is used by GlideWebpDecoder ? is this decoder is on latest version?

mnjit20 avatar Mar 28 '18 08:03 mnjit20

@mnjit20 GlideWebpDecoder is developed based on glide 4.2.0; Glide updates too fast and modifies some interface. GlideWebpDecoder needs to make some change to adapter the latest glide version.

zjupure avatar Mar 29 '18 15:03 zjupure

I have written a glide integration webp library to support playing animated webp images, see GlideWebpDecoder. This is based on libwebp project and some code from Fresco project. Transparent or lossless static-webp images below 4.2.1 will be support after certain tests soon. Feel free to try for supporting webps and improve the project, thanks.

Cpu, memory usage is higher than Fresco

10045125 avatar May 14 '19 12:05 10045125

Is animated webp support still on the roadmap?

geofurb avatar Aug 29 '20 07:08 geofurb

I'm very interested in seeing this available

eman1986 avatar Nov 03 '20 20:11 eman1986

Is animated webp support still on the roadmap?

out0fmemory avatar Nov 23 '20 06:11 out0fmemory

Is animated webp support still on the roadmap?

ajaasazeez avatar Dec 30 '20 11:12 ajaasazeez

I have written a glide integration webp library to support playing animated webp images, see GlideWebpDecoder. This is based on libwebp project and some code from Fresco project. Transparent or lossless static-webp images below 4.2.1 will be support after certain tests soon. Feel free to try for supporting webps and improve the project, thanks.

Cpu, memory usage is higher than Fresco

It would be nice to see a list of requirements from the developers for the proposed code to fulfill, otherwise seems like shooting in the dark.

+1 for supporting animated .webp files.

Thanks

saaib avatar Jan 08 '21 05:01 saaib

We are using Glide 3.7.0, now for loading webp images do we need to do anything additional or library loads webp images by-default? our app has minimum sdk version 5.0.

HassanImtiaz avatar Apr 15 '22 07:04 HassanImtiaz

This would be very nice to see supported, my company use tenor's api and they like to toss in webp files once in a while which isn't rendering and throwing errors. Google themselves recommend the webp format, so some traction would be awesome.

elomonaco avatar Jun 16 '22 21:06 elomonaco

Hope to add support for animated WebP

shenguojun avatar May 04 '23 09:05 shenguojun