Bitmap bitmap = Bitmap.createBitmap( original.getWidth(), original.getHeight(), Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); // Draw the original bitmap (DST during Porter-Duff transfer) canvas.drawBitmap(original, 0, 0, null); // DST_IN = Whatever was there, keep the part that overlaps // with what I'm drawing now Paint maskPaint = new Paint(); maskPaint.setXfermode( new PorterDuffXfermode(PorterDuff.Mode.DST_IN)); canvas.drawBitmap(mask, 0, 0, maskPaint);

DST

(what was already there) SRC

(what we are drawing)