Skip to content

Commit

Permalink
Fixed calculateInSampleSize
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhaval2404 committed May 15, 2021
1 parent c17a937 commit d0d7ecc
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,8 @@ object ImageUtil {
var inSampleSize = 1

if (height > reqHeight || width > reqWidth) {
inSampleSize *= 2
val halfHeight = height / 2
val halfWidth = width / 2
val halfHeight: Int = height / 2
val halfWidth: Int = width / 2

// Calculate the largest inSampleSize value that is a power of 2 and keeps both
// height and width larger than the requested height and width.
Expand Down

0 comments on commit d0d7ecc

Please sign in to comment.