Java tutorial
//package com.java2s; import android.graphics.Bitmap; public class Main { public static Bitmap createTransparent(Bitmap bitmap) { return createTransparent(bitmap.getWidth(), bitmap.getHeight()); } public static Bitmap createTransparent(int width, int height) { Bitmap.Config conf = Bitmap.Config.ARGB_8888; return Bitmap.createBitmap(width, height, conf); } }