Java tutorial
//package com.java2s; //License from project: Open Source License import android.graphics.Bitmap; import android.graphics.Canvas; import android.view.View; public class Main { public static Bitmap createBitmap(View target) { Bitmap b = Bitmap.createBitmap(target.getWidth(), target.getHeight(), Bitmap.Config.ARGB_8888); Canvas c = new Canvas(b); target.draw(c); /* enable this to invert the image: */ //invertImage(b); return b; } }