Android Utililty Methods Bitmap Combine

List of utility methods to do Bitmap Combine

Description

The list of methods to do Bitmap Combine are organized into topic(s).

Method

BitmapcombineDrawables(Resources resources, int head, int body, int legs)
combine Drawables
Bitmap headBitmap = getBitmap(resources, head);
Bitmap bodyBitmap = getBitmap(resources, body);
Bitmap legsBitmap = getBitmap(resources, legs);
int height = headBitmap.getHeight() + bodyBitmap.getHeight()
        + legsBitmap.getHeight();
int width = Math.max(headBitmap.getWidth(),
        Math.max(bodyBitmap.getWidth(), legsBitmap.getWidth()));
Bitmap result = Bitmap.createBitmap(width, height,
...
BitmapcombineImages(Bitmap c, Bitmap s)
Combine bitmap images.
Bitmap cs = null;
cs = Bitmap.createBitmap(c, 0, 0, c.getWidth(), c.getHeight());
Canvas comboImage = new Canvas(cs);
comboImage.drawBitmap(s, 0f, 0f, null);
return cs;
Bitmapmerge(Bitmap bmp1, Bitmap bmp2)
merge
if (null == bmp1 || bmp1.isRecycled() || null == bmp2
        || bmp2.isRecycled())
    return null;
Paint paint_comm = new Paint(Paint.ANTI_ALIAS_FLAG);
Bitmap bmOverlay = Bitmap.createBitmap(bmp2.getWidth(),
        bmp2.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bmOverlay);
float x = (bmp2.getWidth() - bmp1.getWidth()) / 2f;
...