Code example for ColorMatrixColorFilter

0
	 
	public SaturationProcessor(int saturation) {
		colorMatrix = new ColorMatrix();
		colorMatrix.setSaturation(saturation);
		paint = new Paint();
		paint.setColorFilter(new ColorMatrixColorFilter(colorMatrix));
		this.saturation = saturation;
	} 
	 
	public int getSaturation() { 
		return saturation;
	} 
	 
	@Override 
	public String getId() {
		return "saturation"+saturation;
	} 
 
	@Override 
	public Bitmap process(Bitmap in) {
		Bitmap out = Bitmap.createBitmap(in.getWidth(), in.getHeight(), Bitmap.Config.ARGB_8888);