android 存储图片到data目录和读取data目录下的图片
</pre>存储图片代码:<p><pre name="code" class="java">String str1 = "icon.png";
FileOutputStream localFileOutputStream1 = openFileOutput(str1, 0);
Bitmap.CompressFormat localCompressFormat = Bitmap.CompressFormat.PNG;
bitmap.compress(localCompressFormat, 100, localFileOutputStream1);
localFileOutputStream1.close();
读取图片代码:
String localIconNormal = "icon.png";
FileInputStream localStream = openFileInput(localIconNormal);
Bitmap bitmap = BitmapFactory.decodeStream(localStream));
摘自 xiaoxiaobian3310903的专栏
补充:移动开发 , Android ,