@Override public Bitmap transform(Bitmap source) {
int width = source.getWidth();
int height = source.getHeight();
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setColorFilter(new PorterDuffColorFilter(mColor, PorterDuff.Mode.SRC_ATOP));
canvas.drawBitmap(source, 0, 0, paint);
source.recycle();
return bitmap;
}
ColorFilterTransformation.java 文件源码
java
阅读 37
收藏 0
点赞 0
评论 0
项目:Picasso-transformations
作者:
评论列表
文章目录