android 图片灰度处理的处理
16lz
2022-03-30
图片变为灰度
Bitmap bitmapSrc = BitmapManager.getBitmapResource(getResources(), R.drawable.bitmap);Bitmap buffer = Bitmap.createBitmap(bitmapSrc.getWidth(), bitmapSrc.getHeight(), Config.ARGB_8888); Canvas canvas = new Canvas(buffer);Paint paint = new Paint();ColorMatrix colorMatrix = new ColorMatrix();colorMatrix.setSaturation(0); ColorMatrixColorFilter colorMatrixFilter = new ColorMatrixColorFilter(colorMatrix); paint.setColorFilter(colorMatrixFilter);bufferCanvas.drawBitmap(bitmapSrc, 0, 0, paint);bufferCanvas.save();
android 图片灰度处理的处理
更多相关文章
- 调用android自带的截图工具进行截图
- android 通过滚动条改变图片显示
- Android轮播图Banner使用方法
- android常用方法总结
- android 图片处理
- android 图片水平显示,类Gallery效果
- Android(安卓)三种方式实现圆形ImageView
- Android(安卓)--- 图片的特效处理
- Android——布局的一些动态设置