Fix PuzzleMerge.kt: use maxOf instead of max
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -47,7 +47,7 @@ object PuzzleMerge {
|
||||
context.contentResolver.openInputStream(uri).use { ins ->
|
||||
BitmapFactory.decodeStream(ins, null, opts)
|
||||
}
|
||||
val inSample = maxOf(1, max(opts.outWidth / maxW, opts.outHeight / maxH))
|
||||
val inSample = maxOf(1, maxOf(opts.outWidth / maxW, opts.outHeight / maxH))
|
||||
val opts2 = BitmapFactory.Options().apply { inSampleSize = inSample }
|
||||
context.contentResolver.openInputStream(uri).use { ins ->
|
||||
BitmapFactory.decodeStream(ins, null, opts2)
|
||||
|
||||
Reference in New Issue
Block a user