Here you can find the source of decodeBitmapFromAssets(Context context, String fileName)
public static Bitmap decodeBitmapFromAssets(Context context, String fileName)
//package com.java2s; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import java.io.InputStream; public class Main { public static Bitmap decodeBitmapFromAssets(Context context, String fileName) {// ww w .ja va 2s . c om InputStream is = null; try { is = context.getAssets().open(fileName); return BitmapFactory.decodeStream(is); } catch (Exception e) { return null; } finally { if (is != null) { try { is.close(); } catch (Exception ee) { } } } } }