zjupure / GlideWebpDecoder

A Glide WebpDecoder Intergration Library for decoding and displaying webp images
Apache License 2.0
740 stars 91 forks source link

加载动图和加载静态图片能合并吗? #104

Closed jeesk closed 1 year ago

jeesk commented 1 year ago
  1. 加载动态图片的正确姿势
    GlideApp.with(context)
                    .as(WebpDrawable.class)
  2. 加载静态图片的正确姿势
    .optionalTransform(WebpDrawable.class, new WebpDrawableTransformation(new CenterCrop()))

我写了这两种写法,发现静态图片都不能加载了, 但是我的项目静态图片和动态图片都有, 我又无法区分? 我要怎么处理呢?

zjupure commented 1 year ago

.optionalTransform(WebpDrawable.class, new WebpDrawableTransformation(new CenterCrop())) 这个是给webp动态图片加transform,跟静态图加载没有关系;静态图解码走的glide内置decoder,应该是你们项目自身的问题,可以看下sample使用方式

jeesk commented 1 year ago

.optionalTransform(WebpDrawable.class, new WebpDrawableTransformation(new CenterCrop())) 这个是给webp动态图片加transform,跟静态图加载没有关系;静态图解码走的glide内置decoder,应该是你们项目自身的问题,可以看下sample使用方式

ok, 我先看看是什么情况