Code example for ColorMatrixColorFilter

0
		paint.setColorFilter(null);
		c.drawBitmap(bmpGrayscale, 0, 0, paint);
		ColorMatrix cm = new ColorMatrix();
		getValueBlackAndWhite(); 
		cm.set(carray);
		ColorMatrixColorFilter f = new ColorMatrixColorFilter(cm);
		paint.setColorFilter(f);
		c.drawBitmap(bmpOriginal, 0, 0, paint);
		return bmpGrayscale;
	} 
 
	public static void getValueSaturation() 
	{ 
		// 高饱和度 
		carray[0] = 5;
		carray[1] = 0;
		carray[2] = 0;
		carray[3] = 0;
		carray[4] = -254;
		carray[5] = 0;
Contextual code suggestions in your IDE  Get Codota for Java