Bitmap src = BitmapFactory.decodeResource(getResources(),R.drawable.imgbg); int height = src.getHeight(); int width = src.getWidth(); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { int pixelColor = src.getPixel(x, y); // 颜色值 int A = Color.alpha(pixelColor); // A R G B } }