diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3bf4a0f8e..001deb090 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -113,6 +113,7 @@ dependencies { implementation(libs.awebp) implementation(libs.apng) implementation(libs.avif.integration) + implementation(libs.jxl.integration) implementation(libs.okio) implementation(libs.picasso) { exclude(group = "com.squareup.okhttp3", module = "okhttp") diff --git a/app/src/main/kotlin/org/fossify/gallery/extensions/Context.kt b/app/src/main/kotlin/org/fossify/gallery/extensions/Context.kt index 4af68520a..edac79d3e 100644 --- a/app/src/main/kotlin/org/fossify/gallery/extensions/Context.kt +++ b/app/src/main/kotlin/org/fossify/gallery/extensions/Context.kt @@ -542,6 +542,7 @@ fun Context.loadImageBase( // animation is only supported without rounded corners and the file must be a GIF or WEBP. // Glide doesn't support animated AVIF: https://bumptech.github.io/glide/int/avif.html + // TODO: animate JXL if (animate && roundCorners == ROUNDED_CORNERS_NONE && (path.isGif() || path.isWebP())) { // this is required to make glide cache aware of changes options.decode(Drawable::class.java) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 145a2428a..d247a555f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -69,6 +69,7 @@ glide-compiler = { module = "com.github.bumptech.glide:ksp", version.ref = "glid zjupure-webpdecoder = { module = "com.github.zjupure:webpdecoder", version.ref = "zjupureWebpdecoder" } picasso = { module = "com.squareup.picasso:picasso", version.ref = "picasso" } avif-integration = { group = "com.github.bumptech.glide", name = "avif-integration", version.ref = "glideCompiler" } +jxl-integration = { group = "io.github.awxkee", name = "jxl-coder-glide", version = "2.2.0" } [bundles] room = [ "androidx-room-ktx", diff --git a/settings.gradle.kts b/settings.gradle.kts index d5851af00..182a0ab27 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -10,8 +10,8 @@ dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() - jcenter() mavenCentral() + jcenter() maven { setUrl("https://jitpack.io") } } }