mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix(reader): Don't use coil pipeline if image size can't be extracted
This commit is contained in:
parent
84f4a35180
commit
03043ef01b
1 changed files with 11 additions and 5 deletions
|
@ -25,16 +25,16 @@ import androidx.core.graphics.scale
|
|||
import co.touchlab.kermit.Logger
|
||||
import com.hippo.unifile.UniFile
|
||||
import eu.kanade.tachiyomi.R
|
||||
import okio.Buffer
|
||||
import okio.BufferedSource
|
||||
import tachiyomi.decoder.Format
|
||||
import tachiyomi.decoder.ImageDecoder
|
||||
import java.io.InputStream
|
||||
import java.util.*
|
||||
import java.util.Locale
|
||||
import kotlin.math.abs
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
import kotlin.math.roundToInt
|
||||
import okio.Buffer
|
||||
import okio.BufferedSource
|
||||
import tachiyomi.decoder.Format
|
||||
import tachiyomi.decoder.ImageDecoder
|
||||
|
||||
object ImageUtil {
|
||||
|
||||
|
@ -795,6 +795,12 @@ object ImageUtil {
|
|||
}
|
||||
else -> throw IllegalArgumentException("Not implemented for class ${data::class.simpleName}")
|
||||
}
|
||||
|
||||
if (minOf(width, height) <= 0) {
|
||||
Logger.e { "Unable to extract bitmap size" }
|
||||
return false
|
||||
}
|
||||
|
||||
return maxOf(width, height) > GLUtil.maxTextureSize
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue