mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 02:34:39 +00:00
chore(coil): Remove commented code [skip ci]
It's used to compress custom cover instead
This commit is contained in:
parent
1d200f426c
commit
2649425259
1 changed files with 0 additions and 23 deletions
|
@ -59,29 +59,6 @@ class TachiyomiImageDecoder(private val resources: ImageSource, private val opti
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
val maxTextureSize = 4096f
|
||||
if (maxOf(bitmap.width, bitmap.height) > maxTextureSize) {
|
||||
val widthRatio = bitmap.width / maxTextureSize
|
||||
val heightRatio = bitmap.height / maxTextureSize
|
||||
|
||||
val targetWidth: Float
|
||||
val targetHeight: Float
|
||||
|
||||
if (widthRatio >= heightRatio) {
|
||||
targetWidth = maxTextureSize
|
||||
targetHeight = (targetWidth / bitmap.width) * bitmap.height
|
||||
} else {
|
||||
targetHeight = maxTextureSize
|
||||
targetWidth = (targetHeight / bitmap.height) * bitmap.width
|
||||
}
|
||||
|
||||
val scaledBitmap = Bitmap.createScaledBitmap(bitmap, targetWidth.toInt(), targetHeight.toInt(), true)
|
||||
bitmap.recycle()
|
||||
bitmap = scaledBitmap
|
||||
}
|
||||
*/
|
||||
|
||||
return DecodeResult(
|
||||
image = bitmap.asImage(),
|
||||
isSampled = sampleSize > 1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue