Java tutorial
//package com.java2s; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; public class Main { public static Bitmap drawableToBitmap(int drawable, Context context) { Bitmap output = null; output = BitmapFactory.decodeResource(context.getResources(), drawable); return output; } }