Java tutorial
//package com.java2s; //License from project: Apache License import android.graphics.Bitmap; public class Main { /** * Method to create a transparent Bitmap. * * @param w int that represents the width. * @param h int that represents the height. * @return A transparent Bitmap with the specified size. */ public static Bitmap createTransparentBitmap(int w, int h) { return Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888); } }