bumptech / glide

An image loading and caching library for Android focused on smooth scrolling
https://bumptech.github.io/glide/
Other
34.48k stars 6.11k forks source link

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

Open EugineKidoz opened 8 years ago

EugineKidoz commented 8 years ago

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.

Sheepment commented 8 years ago

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

sjudd commented 8 years ago

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.

zlkevinet commented 8 years ago

想要使用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

start141 commented 8 years ago

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

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

TWiStErRob commented 8 years ago

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

jjhesk commented 8 years ago

+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

tmxdyf commented 8 years ago

@TWiStErRob 棒棒哒

googolmo commented 7 years ago

Can 4.x display WebP image from internet?

TWiStErRob commented 7 years ago

@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

HeSuxiang commented 6 years ago

two years passed, this feature still a feature

TWiStErRob commented 6 years ago

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.

sjudd commented 6 years ago

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.

Whoisurdady commented 6 years ago

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.

sjudd commented 6 years ago

2765 seems related.

zjupure commented 6 years ago

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.

meikaiss commented 6 years ago

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

mnjit20 commented 6 years ago

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

zjupure commented 6 years ago

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

10045125 commented 5 years ago

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

geofurb commented 3 years ago

Is animated webp support still on the roadmap?

eman1986 commented 3 years ago

I'm very interested in seeing this available

out0fmemory commented 3 years ago

Is animated webp support still on the roadmap?

ajaasazeez commented 3 years ago

Is animated webp support still on the roadmap?

saaib commented 3 years ago

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

HassanImtiaz commented 2 years ago

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.

elomonaco commented 2 years ago

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.

shenguojun commented 1 year ago

Hope to add support for animated WebP

AllanThisgaard commented 3 weeks ago

Hello,

Could this issue be awarded a higher priority? 🙏 The secure FOSS chat app, Signal (https://signal.org/), does not support animated WebP content, affecting millions of users worldwide - and the Signal team directly quote the lack of support in the Glide library, as the reason for it:

We support what Glide supports. Right now, Glide has no built-in webp support and defaults to the system. I don't know if they really support animated webp at all. You can see this issue for reference: https://github.com/bumptech/glide/issues/571 There's some libraries out there that add webp support to Glide that Glide has acknowledged, but IMO if they're not good enough for Glide to merge in, they're probably not good enough for us either. Image decoding is a sensitive area. Either way, not much action for us to take. Animated webp files will start working when Glide adds support.