public static Bitmap doGreyscale(Bitmap src) { final double GS_RED = 0.299; final double GS_GREEN = 0.587; final double GS_BLUE = 0.114; int width = src.getWidth(); int height = src.getHeight(); Bitmap resultBitmap = Bitmap.createBitmap(width, height, src.getConfig()); int A, R, G, B; int pixel; for (int x = 0; x < width; ++x) { for (int y = 0; y < height; ++y) { pixel = src.getPixel(x, y); A = ..