Android Bitmap convert to ByteArray
2016-04-19 11:27
477 查看
Android Bitmap convert to ByteArray
Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher); ByteArrayOutputStream stream = new ByteArrayOutputStream(); bmp.compress(Bitmap.CompressFormat.PNG, 100, stream); byte[] byteArray = stream.toByteArray();
相关文章推荐
- 关于如何正确地在android项目中添加第三方jar包
- Android 传感器hal层分析
- Android wakelock机制
- 监听android软键盘弹出或者关闭的方法
- Android 带清除功能的输入框控件ClearEditText,仿IOS的输入框
- Android Studio 使用快捷键
- 详解Android中AsyncTask的使用
- Android 终于官方支持按百分比来设置控件的宽高了
- android studio利用图形界面打包生成apk
- Android Studio 怎样打JAR包
- Android shape使用
- 解决国内无法安装android sdk的问题
- Android防止按钮连续点击
- Android官方API Demo学习之联系人获取
- android 修改项目的包名以及所有引用的r文件的包名
- Android之Loader理解
- Android中的windowSoftInputMode属性详解
- mpandroidchat实例 仿360你财富
- Android 平滑图片加载和缓存库 Glide 使用详解
- 自定义Dialog