2
我正在寫一些函數在位圖上添加噪聲效果。我發現類似的問題:Add noise effect to a drawingandroid噪聲對位圖的影響
Bitmap outputBitmap = Bitmap.createBitmap(bitmap.getWidth(),bitmap.getHeight(),Bitmap.Config.ARGB_8888);
BitmapShader shader = new BitmapShader (bitmap, TileMode.REPEAT, TileMode.REPEAT);
Paint paint = new Paint();
paint.setShader(shader);
Canvas c = new Canvas(outputBitmap);
c.drawBitmap(bitmap, 0, 0, paint);
我應該如何添加顏色過濾器來獲得這樣的結果?你能提供簡單的代碼嗎?
感謝此代碼 – roomtek
@roomtek歡迎兄弟.. –