I am trying to write an application, that would allow me to render multiple images onto an ImageView in Android. I can find the method to populate it with a sigle bitmap. Bu
I wrote this method to merge small bitmaps together. It isn't terribly efficient but for simple application purposes it seems to work fine. This example simply centers the overlay image on the base image.
public static Bitmap mergeImage(Bitmap base, Bitmap overlay)
{
int adWDelta = (int)(base.getWidth() - overlay.getWidth())/2 ;
int adHDelta = (int)(base.getHeight() - overlay.getHeight())/2;
Bitmap mBitmap = Bitmap.createBitmap(base.getWidth(), base.getHeight(), Config.ARGB_8888);
Canvas canvas = new Canvas(mBitmap);
canvas.drawBitmap(base, 0, 0, null);
canvas.drawBitmap(overlay, adWDelta, adHDelta, null);
return mBitmap;
}