penfeizhou / APNG4Android

Android animation support for APNG & Animated WebP & Gif & Animated AVIF, High performance
Apache License 2.0
570 stars 75 forks source link

Glide 使用apng #175

Closed yishangfei closed 1 year ago

yishangfei commented 1 year ago

New Issue Checklist

Issue Info

Info Value
Device Info e.g. Huawei Mate 30 pro
System Version e.g. 6.0
APNG4Android Library Version e.g. 1.0.0
Repro rate e.g. all the time (100%) / sometimes x% / only once
Repro with our demo project e.g. does it happen with our demo project?
Demo project link e.g. link to a demo project that highlights the issue

Issue Description and Steps

Please fill in the detailed description of the issue (full output of any stack trace, compiler error, ...) and the steps to reproduce the issue.

Build.Gradle配置 api 'com.github.bumptech.glide:glide:4.14.2' kapt 'com.github.bumptech.glide:compiler:4.14.2' api 'com.github.penfeizhou.android.animation:apng:2.24.0' api 'com.github.penfeizhou.android.animation:glide-plugin:2.24.0'

代码 Glide.with(context) .load("http://embyvip.misakaf.org:8096/emby/Items/495831/Images/Primary?maxWidth=540&tag=d938cf29a2defa3b31c159dddfa0b83b&quality=90") .transform(RoundedCorners(15)) .into(itemMovieImg)

图片无法动 使用APNGParser.isAPNG 是false

尝试用 https://github.com/oupson/Kapng-Android这个库是能动的

penfeizhou commented 1 year ago

本库不支持glide的transformer

yishangfei commented 1 year ago

我去掉那一行也不行 主要是我去用APNGParser.isAPNG 提示我这个不是apng 可我这张图是apng把 @penfeizhou

penfeizhou commented 1 year ago

APNG Demo里这张APNG图可以正常播放

yishangfei commented 1 year ago

kotlin 使用kapt导入glide:compiler 然后新建下面这个类 Build->Rebuild Project编译出GlideApp @GlideModule class BaseGlideModule : AppGlideModule()

zhaoyubetter commented 5 months ago

还是静态图。不知道怎么回事。

jingpeng commented 5 months ago

还是静态图。不知道怎么回事。

能提供下你的demo代码么