//原图,是我博客的头像
ImageView image1 = (ImageView) findViewById(R.id.image1);
Glide.with(this).load(url).crossFade(1000).into(image1);
//原图 -> 圆图
ImageView image2 = (ImageView) findViewById(R.id.image2);
Glide.with(this).load(url).bitmapTransform(new CropCircleTransformation(this)).crossFade(1000).into(image2);
//原图的毛玻璃、高斯模糊效果
ImageView image3 = (ImageView) findViewById(R.id.image3);
Glide.with(this).load(url).bitmapTransform(new BlurTransformation(this, 25)).crossFade(1000).into(image3);
//原图基础上复合变换成圆图 +毛玻璃(高斯模糊)
ImageView image4 = (ImageView) findViewById(R.id.image4);
Glide.with(this).load(url).bitmapTransform(new BlurTransformation(this, 25), new CropCircleTransformation(this)).crossFade(1000).into(image4);
//原图处理成圆角,如果是四周都是圆角则是RoundedCornersTransformation.CornerType.ALL
ImageView image5 = (ImageView) findViewById(R.id.image5);
Glide.with(this).load(url).bitmapTransform(new RoundedCornersTransformation(this, 30, 0, RoundedCornersTransformation.CornerType.BOTTOM)).crossFade(1000).into(image5);
网友评论