Glide-更多图片变换,glide-transformations的使用(六)

来源:互联网 发布:童声配音软件 编辑:程序博客网 时间:2024/04/26 06:27

Gradle

compile 'jp.wasabeef:glide-transformations:3.0.1'

模糊处理

        Glide.with(this).load(url)                .apply(bitmapTransform(new BlurTransformation(25)))                .into(imageView);

这里写图片描述

黑白化

Glide.with(this)     .load(url)     .apply(bitmapTransform(new GrayscaleTransformation()))     .into(imageView);

这里写图片描述

多个效果

现在实现模糊效果加圆角效果

MultiTransformation multi = new MultiTransformation(                new BlurTransformation(25),                new RoundedCornersTransformation(128, 0, RoundedCornersTransformation.CornerType.ALL));Glide.with(this)     .load(url)     .apply(bitmapTransform(multi))     .into(imageView);

这里写图片描述

更多效果可以去项目Github源码中查看
https://github.com/wasabeef/glide-transformations