大图处理
来源:互联网 发布:js代码压缩工具 编辑:程序博客网 时间:2024/04/29 00:12
大图处理
闲着没事写的一个方法
public Bitmap getTargetBitmap(int iamgeResource,int targetWidth,int targetHeight) { BitmapFactory.Options options = new BitmapFactory.Options(); //设置options options.inJustDecodeBounds = true; BitmapFactory.decodeResource(getResources(),iamgeResource,options); int outWidth = options.outWidth; int outHeight = options.outHeight; //计算宽高比 int widthB = outWidth / targetWidth; int heightB = outHeight / targetHeight; //使用合适的比例 int targetComple = widthB > heightB ? widthB : heightB; //重新设置options options.inSampleSize = targetComple; options.inJustDecodeBounds = false; return BitmapFactory.decodeResource(getResources(),iamgeResource,options);}
0 0
- 大图处理
- 大图处理
- Android处理大图片
- iOS处理大图片
- Android大图片处理
- Android 处理大图片
- Android大图片处理
- Android大图片处理
- android_62_大图片处理
- 大图处理,图片丢失
- openslide处理大图
- android采样处理大图方法
- android 加载大图片处理
- 处理大图片(1)
- 处理大图片(2)
- ZBar大图像处理加速
- 大图片的压缩处理
- 本地大图片的处理
- ArcGIS中实现地理坐标转换为投影坐标操作流程
- 区间DP——1048 石子归并 codevs
- poj 3278
- mongo笔记
- hdu1257 最少拦截系统(贪心)
- 大图处理
- 【43】Activity的几种LaunchMode及使用场景
- UVA - 11572 Unique Snowflakes
- 用 SharedPreferences 存储用户名
- runtime 获取类的属性,方法,成员变量,以及协议 字典转model 总结
- Android系统构架概述
- DTO与VO,PO等常见值对象的区别
- Android listView 设置item显示的数目
- tableView小知识整理(一)