Merge \\"docs: Fixed logic for determining image sample size\\" into nyc-dev am: 025ad10a9b

am: 45278444bf

Change-Id: I5958502881429ba1e1ef65247eabf97376d2f7f5
This commit is contained in:
Mark Lu
2016-07-11 20:28:51 +00:00
committed by android-build-merger

View File

@@ -115,8 +115,8 @@ public static int calculateInSampleSize(
// Calculate the largest inSampleSize value that is a power of 2 and keeps both
// height and width larger than the requested height and width.
while ((halfHeight / inSampleSize) > reqHeight
&& (halfWidth / inSampleSize) > reqWidth) {
while ((halfHeight / inSampleSize) >= reqHeight
&& (halfWidth / inSampleSize) >= reqWidth) {
inSampleSize *= 2;
}
}