Skip to content

feat: add a dependency with a glide-plugin to support APNG, animated WebP on Android #834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

baron-chiu
Copy link

@baron-chiu baron-chiu commented Oct 8, 2021

In #673, @ardalahmet provides a simple way to add support of APNG on Android.

Since glide doesn't support APNG, react-native-fast-image hasn't supported APNG on Android.
However @penfeizhou's APNG4Android provides a glide-plugin to support animation easily. It supports gif, APNG, and Animated WebP.

This PR simply applies @ardalahmet's suggestion and add it to Android's gradle dependency.

Should there be any concern of adding the glide plugin?

closes #92 #673

related PR: #703 #542

@baron-chiu baron-chiu changed the title feat: add a dependency with glide-pluin to support APNG on Android feat: add a dependency with a glide-plugin to support APNG on Android Oct 8, 2021
@baron-chiu baron-chiu changed the title feat: add a dependency with a glide-plugin to support APNG on Android feat: add a dependency with a glide-plugin to support APNG, animated WEBP on Android Oct 8, 2021
@baron-chiu baron-chiu changed the title feat: add a dependency with a glide-plugin to support APNG, animated WEBP on Android feat: add a dependency with a glide-plugin to support APNG, animated WebP on Android Oct 9, 2021
@sanjeevyadavIT
Copy link

@lucalves any update whether this PR will be merged or not, it will help me a lot

@lucalves
Copy link

@lucalves any update whether this PR will be merged or not, it will help me a lot

I can't merge because I'm not part of the project's maintainers. I just approved the PR because I didn't see anything wrong.

@GollyJer
Copy link

GollyJer commented Nov 1, 2021

Just switched my app over to fast-image without realizing this wasn't yet supported.
This looks like a good, non-breaking PR. Anyone know if there's plans to merge?

@baron-chiu
Copy link
Author

Maybe some benchmark test and unit test will help?

I have little experience in react native. Can I have some suggestions for them?

I will add them if I can manage to deliver.
Any help is appreciated.

@hirbod
Copy link

hirbod commented Jan 7, 2022

@DylanVann any chance to release this?

If any Expo user needs this, I've prepared some config-plugins for you:
https://gist.github.com/Hirbod/07c6641970c9406ff35a7271dda1f01c

@hirbod
Copy link

hirbod commented Jan 7, 2022

@bcgodev this is outdated, use
implementation "com.github.zjupure:webpdecoder:2.0.4.12.0" instead.

@baron-chiu
Copy link
Author

com.github.zjupure:webpdecoder

Thanks for the reminder. I took a look at com.github.zjupure:webpdecoder and it seems it only supports webp. Please correct me if I am wrong.

I can update the version of com.github.penfeizhou.android.animation to v2.17.0. Would it be good for you?

@hirbod
Copy link

hirbod commented Jan 7, 2022

@bcgodev I didn't check on the APNG part, I only need webP support and your implementation lib didn't work for me, but mine did.

@jingpeng
Copy link

jingpeng commented Jan 7, 2022

@hirbod Hi, just implementation 'com.github.penfeizhou.android.animation:glide-plugin:2.17.0' will resolve your problem, it supports APNG & WEBP both.

@hirbod
Copy link

hirbod commented Jan 7, 2022

Thanks. Are there any benefits with the other library instead of mine, beside of the APNG support? (I don't need APNG)

@baron-chiu
Copy link
Author

your implementation lib didn't work for me, but mine did.

@hirbod Can I ask what doesn't work for you with v2.12.0?

@hirbod
Copy link

hirbod commented Jan 9, 2022

The image wasn't animating for me. Didn't try 17 though

@baron-chiu
Copy link
Author

The image wasn't animating for me. Didn't try 17 though

I think it works for https://isparta.github.io/compare-webp/image/gif_webp/webp/2.webp

@tomscheney
Copy link

@bcgodev this is outdated, use implementation "com.github.zjupure:webpdecoder:2.0.4.12.0" instead.

fix my problem, thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Animated WebP support.
7 participants