????public int calculateInSampleSize(BitmapFactory.Options option, int rWidth, int rHeight) { ????????final ????????final ????????option.inSampleSize = 1; ? ????????while ((height / option.inSampleSize) > rHeight || (width / option.inSampleSize) > rWidth) { ????????????option.inSampleSize *= 2; ????????} ????????return option.inSampleSize; ????} |
时间: 2024-11-10 10:28:03