如何修改位图的rgb像素看起来不同

我试图将位图图像转换为在热或夜间捕获的图像。

但我不知道是什么/如何修改像素看起来像那样。 我只知道

public static Bitmap newBitmapwithNightOrThermalEffect(Bitmap bmp) { long start = System.currentTimeMillis(); int width = bmp.getWidth(); int height = bmp.getHeight(); Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565); int pixColor = 0; int pixR = 0; int pixG = 0; int pixB = 0; int newR = 0; int newG = 0; int newB = 0; int[] pixels = new int[width * height]; bmp.getPixels(pixels, 0, width, 0, 0, width, height); for (int i = 0; i < height; i++) { for (int k = 0; k  255 ? 255 : newR, newG > 255 ? 255 : newG, newB > 255 ? 255 : newB); pixels[width * i + k] = newColor; } } bitmap.setPixels(pixels, 0, width, 0, 0, width, height); long end = System.currentTimeMillis(); Log.d("may", "used time=" + (end - start)); return bitmap; } 

在Code中阅读我的评论