, 당신이 타고 통해 다른 이미지를 하나 개의 이미지를 원하는, 당신은 다음과 같이 수행 할 수 있습니다
// 2 bitmap images are : Bitmap image1, image2. You know how to get it right?
image1 = image1.copy(Config.ARGB_8888, true);
image2 = image2.copy(config.ARGB_8888, true);
//Get color at the pixel (0,0)
int color = image2.getPixel(0,0);
//Set the color of pixel (0,0) of image2 to same color with pixel (0,0) of image 1
image2.setPixel(0,0,color);
공지 사항, 그 두 이미지가해야 같은 구성을 가지고 !!
당신이 당신의지도에 그릴하려면 다음
//Your Bitmap map must config like above
Canvas canvas = new Canvas(map);
Paint paint = new Paint();
paint.setColor(Color.RED);
paint.setAntiAlias(true);
// Draw yourMakerBitmap from pixel(0,0) of your map
canvas.drawBitmap(yourMakerBitmap, 0, 0, paint);
당신이 canvas.drawBitmap(...)
를 호출 한 후, 당신의 map
는 위에 maker
있을 것이다. 이제 map
과 maker
의 새로운 기능으로 원하는 것을 할 수 있습니다!
레이아웃에서이 비트 맵 이미지를 표시 할 수 있습니까? – Rahul