Android 读取Assets中图片
2014-08-01 18:00
288 查看
bgimg0 = getImageFromAssetsFile("Cat_Blink/cat_blink0000.png");
*
* 从Assets中读取图片
*/
private Bitmap getImageFromAssetsFile(String fileName)
{
Bitmap image = null;
AssetManager am = getResources().getAssets();
try
{
InputStream is = am.open(fileName);
image = BitmapFactory.decodeStream(is);
is.close();
}
catch (IOException e)
{
e.printStackTrace();
}
return image;
}
*
* 从Assets中读取图片
*/
private Bitmap getImageFromAssetsFile(String fileName)
{
Bitmap image = null;
AssetManager am = getResources().getAssets();
try
{
InputStream is = am.open(fileName);
image = BitmapFactory.decodeStream(is);
is.close();
}
catch (IOException e)
{
e.printStackTrace();
}
return image;
}
相关文章推荐
- android-读取Assets图片资源保存到SD - 随心
- Android从assets中读取文本和图片资源
- android-读取Assets图片资源保存到SD - 随心
- Android 读取Assets中图片
- android_读取assets中的图片和文本文档
- Android 读取Assets中图片
- Android 读取Assets中图片
- Android读取assets目录下的所有图片并显示的方法
- Android 读取Assets中图片
- android读取Assets图片资源保存到SD卡然后显示到ImageView里 实例
- Android 读取Assets中图片
- Android从Assets中读取图片
- Android:漫画APP开发笔记之从Assets本地读取图片
- 从Android读取Unity assets下的图片并保存为Bitmap格式
- Android 读取Assets中图片
- Android 读取Assets中图片
- android 存储图片到data目录和读取data目录下的图片
- android从assets和res文件夹中读取资源
- android 从assets和res中读取文件(转)