From 7d144920d5f75fff15514e24e098b503c806c60d Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 28 Mar 2022 21:18:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/help/glide/BlurTransformation.kt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/glide/BlurTransformation.kt b/app/src/main/java/io/legado/app/help/glide/BlurTransformation.kt index 3b02b8004..17c24b56c 100644 --- a/app/src/main/java/io/legado/app/help/glide/BlurTransformation.kt +++ b/app/src/main/java/io/legado/app/help/glide/BlurTransformation.kt @@ -8,8 +8,6 @@ import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool import com.bumptech.glide.load.resource.bitmap.CenterCrop import io.legado.app.utils.stackBlur import java.security.MessageDigest -import kotlin.math.min -import kotlin.math.roundToInt /** @@ -28,11 +26,7 @@ class BlurTransformation( outHeight: Int ): Bitmap { val transform = super.transform(pool, toTransform, outWidth, outHeight) - //图片缩小1/2 - val width = (min(outWidth, transform.width) / 5f).roundToInt() - val height = (min(outHeight, transform.height) / 5f).roundToInt() - val blurredBitmap = Bitmap.createScaledBitmap(transform, width, height, false) - return blurredBitmap.stackBlur(radius) + return transform.stackBlur(radius) } override fun updateDiskCacheKey(messageDigest: MessageDigest) {