Merge pull request #253 from Quackdoc/jxl-support

feat: jxl support
This commit is contained in:
Naveen Singh 2024-09-03 15:01:13 +05:30 committed by GitHub
commit adf3180807
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 1 deletions

View file

@ -113,6 +113,7 @@ dependencies {
implementation(libs.awebp) implementation(libs.awebp)
implementation(libs.apng) implementation(libs.apng)
implementation(libs.avif.integration) implementation(libs.avif.integration)
implementation(libs.jxl.integration)
implementation(libs.okio) implementation(libs.okio)
implementation(libs.picasso) { implementation(libs.picasso) {
exclude(group = "com.squareup.okhttp3", module = "okhttp") exclude(group = "com.squareup.okhttp3", module = "okhttp")

View file

@ -542,6 +542,7 @@ fun Context.loadImageBase(
// animation is only supported without rounded corners and the file must be a GIF or WEBP. // 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 // 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())) { if (animate && roundCorners == ROUNDED_CORNERS_NONE && (path.isGif() || path.isWebP())) {
// this is required to make glide cache aware of changes // this is required to make glide cache aware of changes
options.decode(Drawable::class.java) options.decode(Drawable::class.java)

View file

@ -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" } zjupure-webpdecoder = { module = "com.github.zjupure:webpdecoder", version.ref = "zjupureWebpdecoder" }
picasso = { module = "com.squareup.picasso:picasso", version.ref = "picasso" } picasso = { module = "com.squareup.picasso:picasso", version.ref = "picasso" }
avif-integration = { group = "com.github.bumptech.glide", name = "avif-integration", version.ref = "glideCompiler" } 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] [bundles]
room = [ room = [
"androidx-room-ktx", "androidx-room-ktx",

View file

@ -10,8 +10,8 @@ dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories { repositories {
google() google()
jcenter()
mavenCentral() mavenCentral()
jcenter()
maven { setUrl("https://jitpack.io") } maven { setUrl("https://jitpack.io") }
} }
} }