1
的Android嘉洛斯我使用下面的代码,使我的照片黑为黑色
BitmapDrawable bdarw = new BitmapDrawable(imagePath);
ColorMatrix cm = new ColorMatrix();
cm.set(new float[] {
2, 1f, 0, 0, 0,
0, 2, 0f, 0, 0,
0, 0, 2, 0f, 0,
0, 0, 0, 1f, 0 });
bdarw.setColorFilter(new ColorMatrixColorFilter(cm));
Bitmap bitmap= bdarw.getBitmap();
ImageView imageView = (ImageView) findViewById(R.id.imgV);
imageView.setImageBitmap(bitmap);
但似乎彩色矩阵是不正确的,你可以请帮我
你能帮我理解他们每个人:( – 2012-02-04 08:43:26