Merge "docs: Fixed logic for determining image sample size" into nyc-dev
This commit is contained in:
@@ -115,8 +115,8 @@ public static int calculateInSampleSize(
|
|||||||
|
|
||||||
// Calculate the largest inSampleSize value that is a power of 2 and keeps both
|
// Calculate the largest inSampleSize value that is a power of 2 and keeps both
|
||||||
// height and width larger than the requested height and width.
|
// height and width larger than the requested height and width.
|
||||||
while ((halfHeight / inSampleSize) > reqHeight
|
while ((halfHeight / inSampleSize) >= reqHeight
|
||||||
&& (halfWidth / inSampleSize) > reqWidth) {
|
&& (halfWidth / inSampleSize) >= reqWidth) {
|
||||||
inSampleSize *= 2;
|
inSampleSize *= 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user