X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/33f9f9a210387009416a71916d5fb844c7f6d55c..afaa2879d192be067cae523b51dad75d89a6c6cb:/src/com/owncloud/android/utils/BitmapUtils.java diff --git a/src/com/owncloud/android/utils/BitmapUtils.java b/src/com/owncloud/android/utils/BitmapUtils.java index ce7590d5..7b9382e6 100644 --- a/src/com/owncloud/android/utils/BitmapUtils.java +++ b/src/com/owncloud/android/utils/BitmapUtils.java @@ -95,7 +95,9 @@ public class BitmapUtils { if (height > reqHeight || width > reqWidth) { final int halfHeight = height / 2; final int halfWidth = width / 2; - + + // calculates the largest inSampleSize value (for smallest sample) 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) { inSampleSize *= 2;