Android - 从内部存储和ID获取保存的位图

时间:2014-07-10 18:25:54

标签: android bitmap

如何使用资源ID从内部存储中获取已保存的位图?

saveImageToInternalStorage(context, bitmap, "car" );
int drawable = getImageFromInternalStorage(context, "car"); // <- How to do this and put it in the Array imageIDs below?

final int[] imageIDs = {R.drawable.a, R.drawable.b, R.drawable.c, R.drawable.d,
                R.drawable.e, R.drawable.f , drawable };

1 个答案:

答案 0 :(得分:1)

How to display bitmap from internal storage?可能会有所帮助......你需要创建文件输入/输出流并指定路径才能获得bitmapimage ...