/** * Load a picture from assets. * * <p>This method will throw RuntimeException if the image file does not exist. * * @param context * @param assetPath The image file path in the assets folder. For example, if the image file is * <code>assets/images/abc.png</code>, then assetPath is <code>images/abc.png</code> * @return */ public static Bitmap loadBitmapFromAssetNoThrow(Context context, String assetPath) { try { return loadBitmapFromAsset(context, assetPath); } catch (IOException e) { throw ErrorUtil.runtimeException(e); } }