zjupure / GlideWebpDecoder

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

glide load 使用了override加载就会失败 #82

Closed ccccmmmz closed 3 years ago

zjupure commented 3 years ago

没明白这是什么问题,sample工程有问题吗

ccccmmmz commented 3 years ago

GlideApp.with(mContext) .load(url) .optionalTransform(circleCrop) .optionalTransform(WebpDrawable.class, new WebpDrawableTransformation(circleCrop)) .into(imageView); 就是这里面如果使用了override()就会失败

ccccmmmz commented 3 years ago

1.6.4.8.0可以怎么可以加载指定size的webp嘛 就是使用override()属性

zjupure commented 3 years ago

GlideApp.with(mContext) .load(url) .optionalTransform(circleCrop) .optionalTransform(WebpDrawable.class, new WebpDrawableTransformation(circleCrop)) .into(imageView); 就是这里面如果使用了override()就会失败

在sample工程里试了下,没有发现有问题,可以指定解码的图像size

GlideApp.with(mContext)
                //.asBitmap()
                .load(url)
                .placeholder(R.drawable.image_loading)
                .error(R.drawable.image_error)
                .optionalTransform(mBitmapTrans)
                .optionalTransform(WebpDrawable.class, new WebpDrawableTransformation(mBitmapTrans))
                .override(300, 300)
                .into(imageView);