Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; public class Main { public static Bitmap createBitmap(int resource, Context context) { return BitmapFactory.decodeResource(context.getResources(), resource); } }