private static int calculateInSampleSize(Options options, int reqWidth, int reqHeight) {
int height = options.outHeight;
int width = options.outWidth;
int inSampleSize = 1;
if (height > reqHeight || width > reqWidth) {
int halfHeight = height / 2;
int halfWidth = width / 2;
inSampleSize = 2;
while (true) {
if (halfHeight / inSampleSize <= reqHeight && halfWidth / inSampleSize <=
reqWidth) {
break;
}
inSampleSize *= 2;
}
}
Helper.showLog("Bitmap Util:", inSampleSize + "");
return inSampleSize;
}
BitmapUtil.java 文件源码
java
阅读 42
收藏 0
点赞 0
评论 0
项目:boohee_v5.6
作者:
评论列表
文章目录