react-native-fast-image icon indicating copy to clipboard operation
react-native-fast-image copied to clipboard

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

Open baron-chiu opened this issue 4 years ago • 14 comments
trafficstars

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 avatar Oct 08 '21 14:10 baron-chiu

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

sanjeevyadavIT avatar Oct 28 '21 12:10 sanjeevyadavIT

@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.

lucalves avatar Oct 28 '21 14:10 lucalves

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?

GollyJer avatar Nov 01 '21 15:11 GollyJer

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.

baron-chiu avatar Nov 04 '21 02:11 baron-chiu

@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 avatar Jan 07 '22 08:01 hirbod

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

hirbod avatar Jan 07 '22 09:01 hirbod

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?

baron-chiu avatar Jan 07 '22 09:01 baron-chiu

@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.

hirbod avatar Jan 07 '22 09:01 hirbod

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

jingpeng avatar Jan 07 '22 09:01 jingpeng

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

hirbod avatar Jan 07 '22 09:01 hirbod

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?

baron-chiu avatar Jan 09 '22 07:01 baron-chiu

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

hirbod avatar Jan 09 '22 09:01 hirbod

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

baron-chiu avatar Jan 09 '22 09:01 baron-chiu

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

fix my problem, thx

tomscheney avatar Mar 13 '23 10:03 tomscheney