android 存储图片到data目录和读取data目录下的图片
2011-12-05 14:07
525 查看
存储图片代码:String str1 = "icon.png";
FileOutputStream localFileOutputStream1 = openFileOutput(str1, 0);
Bitmap.CompressFormat localCompressFormat = Bitmap.CompressFormat.PNG;
bitmap.compress(localCompressFormat, 100, localFileOutputStream1);
localFileOutputStream1.close();
读取图片代码:
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));
相关文章推荐
- android 存储图片到data目录和读取data目录下的图片
- android 存储图片到data目录和读取data目录下的图片
- android怎么读取项目中的图片或文件目录分析
- android 从data目录拷贝图片到sdcard, Bitmap 转成 image
- ANDROID之路-Android_DDMS中读取data目录
- Android-文件存储-将数据保存在data目录下
- Android读取assets目录下的所有图片并显示的方法
- Swift Core Data 图片存储与读取Demo
- Android数据存储:获取网络图片把图片保存到SD卡中并从SDk卡中读取(通过Bitmap方法)
- [Android 数据存储] SDcard/Android/data/ 这个目录是干什么的?
- android 从data目录拷贝图片到sdcard, Bitmap 转成 image
- Android从文件目录中写入和读取图片
- 图片以BLOB存储在后台数据库中,Android客户端要进行读取显示
- Android入门——数据存储之SQLite存储读取图片
- Swift Core Data 图片存储与读取Demo
- Swift Core Data 图片存储与读取Demo
- android中保存图片到/data/data/<package name>/files/目录中
- 数据库操作_连接SQL Server数据库示例;连接ACCESS数据库;连接到 Oracle 数据库示例;SqlCommand 执行SQL命令示例;SqlDataReader 读取数据示例;使用DataAdapter填充数据到DataSet;使用DataTable存储数据库表;将数据库数据填充到 XML 文件;10 使用带输入参数的存储过程;11 使用带输入、输出参数的存储过程示;12 获得数据库中表的数目和名称;13 保存图片到SQL Server数据库示例;14 获得插入记录标识号;Exce
- Android sdcard实现图片存储 、联网下载
- Android通过HTTP协议上传图片(multipart/form-data格式)