Skip to content

A Glide Decoder Intergration Library for decoding and displaying HEIC and AVIF images

License

Notifications You must be signed in to change notification settings

msisuzney/GlideHeifDecoder

Repository files navigation

GlideHeifDecoder

license

GlideHeifDecoder is a Glide integration library for decoding and displaying still images in HEIC and AVIF formats on Android platforms.It is based on libheif,in which makes use of libde265 for HEIC image decoding,dav1d for AVIF image decoding.

What are HEIF,HEIC,AVIF?

HEIF is a container format for storing individual images and image sequences.HEIC and AVIF are new image file formats employing HEVC (h.265) or AV1 image coding.They both use HEIF as the image container.

Usage

Add it in your root build.gradle at the end of repositories:

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}

Add the dependency.

dependencies {
        implementation 'com.github.msisuzney:GlideHeifDecoder:0.5'
}

Add a subclass of com.bumptech.glide.module.AppGlideModule annotated by @GlideModule to your source directory file in application module,it will automatically load GlideHeifDecoder.

import com.bumptech.glide.annotation.GlideModule;

@GlideModule
public class AppGlideModule extends com.bumptech.glide.module.AppGlideModule {
}

Now, you can load images in HEIC and AVIF formats.

Glide.with(this).load(/*images in HEIC and AVIF formats */).into(iv);

Acknowledgement

License

The Library is distributed under Apache-2.0-license.