react-native-fast-image
react-native-fast-image copied to clipboard
is there any plan to support APNG on android?
+1. I desperately need support for APNG; It works perfectly well on iOS, but on Android it's not animating, just plain image. However I don't think it will be fastly available because Glide is currently not supporting APNG: https://github.com/bumptech/glide/issues/1542
create ur own loader with glide.
Use this to add Android APNG support to rn-fast-image: https://github.com/penfeizhou/APNG4Android#glide-support
Use https://github.com/ds300/patch-package/ to automate the build.gradle
change.
Did anyone manage to use what @ardalahmet suggested? I keep stumbling over
Could not GET 'https://www.jitpack.io/com/github/penfeizhou/android/animation/glide-plugin/0.2.16/glide-plugin-0.2.16.pom'. Received status code 401 from server: Unauthorized
when I build my project.
My android/build.gradle
has
allprojects {
repositories {
....
jcenter()
}
}
and android/app/build.gradle
has
dependencies {
....
implementation 'com.github.penfeizhou.android.animation:glide-plugin:0.2.16'
}
I tried without "0.2.16" but got Could not find com.github.penfeizhou.android.animation:glide-plugin:.
I got the version string (0.2.16) from here.
Any ideas?
@RobinBobin
You should make the change in rn-fast-image's android/build.gradle file: node_modules/react-native-fast-image/android/build.gradle
maven {
url "https://maven.google.com"
+ url "https://dl.bintray.com/osborn/Android"
}
dependencies {
annotationProcessor 'com.android.support:support-annotations:28.0.0-alpha3'
annotationProcessor "com.github.bumptech.glide:compiler:${_glideVersion}"
implementation("com.github.bumptech.glide:okhttp3-integration:${_glideVersion}")
+ implementation 'com.github.penfeizhou.android.animation:glide-plugin:2.4.2'
}
Thanks a lot! I'll try it out, if we don't decide to use WebP.
Hello!
It does work for me, thanks!
Note: For the animation of animated apng
/webp
to play, there must be a AppGlideModule
in your app. FastImage
have one by default. If you set excludeAppGlideModule = true
but your app doesn't define one, the animation will never start.
@mhammerc What directions worked for you exactly? I'm having a hard time getting this working. Thanks for any help!
on Android, AAPT cruncher(compress) APNG files, and APNG4Android Gilde plugin might render incorrectly. it happens on android release mode only.
use aapt options on build.gradle to avoid compression.
aaptOptions { cruncherEnabled = false }
https://github.com/penfeizhou/APNG4Android/issues/76
update 12.09,
-
url "https://dl.bintray.com/osborn/Android"
is unnecessary.