Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: please explain how to use the library #13

Closed
AndroidDeveloperLB opened this issue Aug 20, 2018 · 6 comments
Closed

Request: please explain how to use the library #13

AndroidDeveloperLB opened this issue Aug 20, 2018 · 6 comments

Comments

@AndroidDeveloperLB
Copy link

The repository webpage only shows the dependencies. But what about how to use it?

@zjupure
Copy link
Owner

zjupure commented Aug 21, 2018

Please see Glide docs and run sample project to see how animated webp is loaded.

@AndroidDeveloperLB
Copy link
Author

The reason I wrote this, is not because of the sample or the docs of Glide.
It's because this repository only mentions how to use its dependency, but not how to actually use it. Not even the simplest way to do it.

@zjupure
Copy link
Owner

zjupure commented Aug 21, 2018

There is no difference between jpg/png or gif/webp with Glide when you load without transformation. The exist code can still work well when the image url change to a webp image. So you only need to add dependencies in your build.gradle. Only with BitmapTransformtaion, you need add some extra code to support it. If you are not familiar with Glide, please read docs and write demo with Glide first.

@AndroidDeveloperLB
Copy link
Author

I am familiar with Glide, but not with this library.
You say that once I just use the dependency, and I try to load WebP animation, it will work as if I'm loading a PNG file, even though I've not used a single piece of code from this library?

@zjupure
Copy link
Owner

zjupure commented Aug 21, 2018

Yes, Glide annotation processor will do everything for you automatically. You can read the Glide source code and related integration to find the answer. The Library only insert a WebpDecoder into Glide built-in decoder lists to support webp image.

@AndroidDeveloperLB
Copy link
Author

Wow this sounds so cool!
You've created some sort of plugin that gets attached automatically to a different library, and that library uses it without me telling it to do it.

I really want to try it out, but for now I still have this issue of importing the sample: #11

That's why I wanted to try an alternative, of the most simple way to show a WebP animation (directly from file, for example).

@zjupure zjupure closed this as completed Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants