Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fff913c1 authored by Mark Lu's avatar Mark Lu Committed by android-build-merger
Browse files

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

Merge \\\"docs: Fixed logic for determining image sample size\\\" into nyc-dev am: 025ad10a am: 60cb07c7
am: b88abf91

Change-Id: I203bd9b7b9bcfda5859c23523369bf825ee3a545
parents 3c97aafd b88abf91
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
        }
    }