草庐IT

reqHeight

全部标签

android - calculateInSampleSize,为什么 Math.round 在 width > height 时处理 height(height/reqHeight)?

我在“developer.android.com”上查看以缩小我的位图文件,但我发现了一件事我不明白。所以我很感激你能给我一点帮助。这是一个snippet来自developer.android.compublicstaticintcalculateInSampleSize(BitmapFactory.Optionsoptions,intreqWidth,intreqHeight){//Rawheightandwidthofimagefinalintheight=options.outHeight;finalintwidth=options.outWidth;intinSampleSiz