LouisWoong / GlideWebpDecoder

A Glide WebpDecoder Intergration Library for decoding and displaying webp images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GlideWebpDecoder

GlideWebpDecoder is a Glide integration library for decoding and displaying webp images on Android platforms. It is based on libwebp project and takes some implementation from Fresco and GlideWebpSupport as references.

Features

  • play animated webp images on all Android versions
  • show transparent or lossless webp images on Android devices lower than 4.2.1 (BitmapFactory support webp decode on 4.2+ android system so we have no need to handle)

Dependency Integration

Library is available in jcenter. If you are build with Gradle, just add the following dependencies to your build.gradle file

// webpdecoder
compile 'com.zlc.glide:webpdecoder:0.0.5'
// glide 4.2
compile 'com.github.bumptech.glide:glide:4.2.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.2.0'

Then you are free to use GlideWebpDecoder just like use other Glide integration library.

Notice: if you want to upgrade Glide version to 4.4, please use webpdecoder 0.0.4;

Proguard

The library use native code to decode webp, so you should put the following lines to your proguard.cfg and keep the jni interface.

-keep public class com.bumptech.glide.integration.webp.WebpImage { *; }
-keep public class com.bumptech.glide.integration.webp.WebpFrame { *; }
-keep public class com.bumptech.glide.integration.webp.WebpBitmapFactory { *; }

Acknowledgement

License

The Library is Apache-2.0, part code is BSD-licensed see Fresco for detail.

About

A Glide WebpDecoder Intergration Library for decoding and displaying webp images

License:Apache License 2.0


Languages

Language:C 93.8%Language:Java 3.3%Language:C++ 1.8%Language:Makefile 1.1%Language:Shell 0.0%