diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/reader/ui/pager/webtoon/WebtoonImageView.kt b/app/src/main/kotlin/org/koitharu/kotatsu/reader/ui/pager/webtoon/WebtoonImageView.kt index 3b3dbba56..cd26a83f7 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/reader/ui/pager/webtoon/WebtoonImageView.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/reader/ui/pager/webtoon/WebtoonImageView.kt @@ -86,9 +86,9 @@ class WebtoonImageView @JvmOverloads constructor( desiredWidth = sWidth desiredHeight = sHeight } else if (resizeHeight) { - desiredHeight = (sHeight.toDouble() / sWidth.toDouble() * desiredWidth).roundToInt() + desiredHeight = (sHeight.toDouble() / sWidth.toDouble() * desiredWidth).toInt() } else if (resizeWidth) { - desiredWidth = (sWidth.toDouble() / sHeight.toDouble() * desiredHeight).roundToInt() + desiredWidth = (sWidth.toDouble() / sHeight.toDouble() * desiredHeight).toInt() } } desiredWidth = desiredWidth.coerceAtLeast(suggestedMinimumWidth)