Here you can find the source of getBitmapFromAssert(Context thisContext, String name)
public static Bitmap getBitmapFromAssert(Context thisContext, String name)
//package com.java2s; import java.io.IOException; import java.io.InputStream; import android.content.Context; import android.content.res.AssetManager; import android.graphics.Bitmap; import android.graphics.BitmapFactory; public class Main { public static Bitmap getBitmapFromAssert(Context thisContext, String name) {//from w w w. ja v a2s . c o m Bitmap bm = null; try { AssetManager am = thisContext.getAssets(); InputStream is = am.open(name); bm = BitmapFactory.decodeStream(is); is.close(); } catch (IOException e) { e.printStackTrace(); } return bm; } }