mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Fixed cropping and added jpegxl support (sadly)
apk size go BIG closes #1236
This commit is contained in:
parent
1c4215a371
commit
de2c7ed4e7
3 changed files with 5 additions and 3 deletions
|
@ -103,10 +103,10 @@ android {
|
|||
|
||||
dependencies {
|
||||
// Modified dependencies
|
||||
implementation("com.github.jays2kings:subsampling-scale-image-view:dfd3e43") {
|
||||
implementation("com.github.jays2kings:subsampling-scale-image-view:756849e") {
|
||||
exclude(module = "image-decoder")
|
||||
}
|
||||
implementation("com.github.tachiyomiorg:image-decoder:0e91111")
|
||||
implementation("com.github.tachiyomiorg:image-decoder:7481a4a")
|
||||
|
||||
// Source models and interfaces from Tachiyomi 1.x
|
||||
implementation("tachiyomi.sourceapi:source-api:1.1")
|
||||
|
|
|
@ -48,7 +48,7 @@ class TachiyomiImageDecoder(private val resources: ImageSource, private val opti
|
|||
ImageUtil.findImageType(it)
|
||||
}
|
||||
return when (type) {
|
||||
ImageUtil.ImageType.AVIF/*, ImageUtil.ImageType.JXL */ -> true
|
||||
ImageUtil.ImageType.AVIF, ImageUtil.ImageType.JXL -> true
|
||||
ImageUtil.ImageType.HEIF -> Build.VERSION.SDK_INT < Build.VERSION_CODES.O
|
||||
else -> false
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ object ImageUtil {
|
|||
Format.Gif -> ImageType.GIF
|
||||
Format.Heif -> ImageType.HEIF
|
||||
Format.Jpeg -> ImageType.JPEG
|
||||
Format.Jxl -> ImageType.JXL
|
||||
Format.Png -> ImageType.PNG
|
||||
Format.Webp -> ImageType.WEBP
|
||||
else -> null
|
||||
|
@ -86,6 +87,7 @@ object ImageUtil {
|
|||
GIF("image/gif", "gif"),
|
||||
HEIF("image/heif", "heif"),
|
||||
JPEG("image/jpeg", "jpg"),
|
||||
JXL("image/jxl", "jxl"),
|
||||
PNG("image/png", "png"),
|
||||
WEBP("image/webp", "webp"),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue