一个Android转换库提供了多种图像变换滑翔。
请随意使用。
演示
原始图像
转换
我如何使用它?
步骤1
摇篮
库{ jcenter() mavenCentral() // GPUImage为Android } 依赖{ 编译“ jp.wasabeef:滑翔转换:2.0.1 ' //如果要使用GPU过滤器 编译' jp.co.cyberagent.android.gpuimage:gpuimage库:1.3.0 ' }
第2步
设置滑翔变换。
滑行。用(这个)。负载(ř 。绘制。演示) .bitmapTransform(新 BlurTransformation(上下文)) .into((ImageView的)findViewById(ř 。 ID 。图片));
先进的第3步
您可以设置多个转换。
滑行。用(这个)。负载(ř 。绘制。演示) .bitmapTransform(新 BlurTransformation(背景下,25),新 CropCircleTransformation(上下文)) .into((ImageView的)findViewById(ř 。 ID 。图片));
转换
作物
CropTransformation
,CropCircleTransformation
,CropSquareTransformation
, RoundedCornersTransformation
颜色
ColorFilterTransformation
, GrayscaleTransformation
模糊
BlurTransformation
面具
MaskTransformation
GPU过滤器(使用GPUImage)
将需要添加依赖关系GPUImage。
ToonFilterTransformation
,SepiaFilterTransformation
,,,,,ContrastFilterTransformation
InvertFilterTransformation
PixelationFilterTransformation
SketchFilterTransformation
SwirlFilterTransformation
BrightnessFilterTransformation
KuwaharaFilterTransformation
VignetteFilterTransformation
资源均来自第三方,谨慎下载,前往第三方网站下载