Skip to content

A lightweight (<180KB), easy-to-extend Android filter and dynamic sticker framework for adding filters and stickers for camera, video, bitmap and view.(一个轻量级(<180KB)、易扩展的Android滤镜和动态贴纸框架,支持摄像头、视频、图片和视图添加滤镜和贴纸。)

License

Notifications You must be signed in to change notification settings

woniu163/EZFilter

 
 

Repository files navigation

Logo

EZFilter

A lightweight (<180KB), easy-to-extend Android filter and dynamic sticker framework for adding filters and stickers for camera, video, bitmap and view.

中文

Download

Demo

Download

Screenshot

View加滤镜

Features

1.Support Camera, Camera2, Video, Bitmap and View add filters

2.Support Camera, Camera2, Video, Bitmap and View add dynamic stickers

3.Support recording video

4.Support screenshot

5.Support offscreen rendering

Usage

Gradle

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    compile 'cn.ezandroid:EZFilter:x.x.x' // Gradle version < 3.0
    // or
    implementation 'cn.ezandroid:EZFilter:x.x.x' // Gradle version >= 3.0
}

Sample

you can use EZFilter.input(xxx).addFilter(filter).into(view) to add filter and display.

EZFilter.input(bitmap)
        .addFilter(filter)
        .into(view);
EZFilter.input(video)
        .setLoop(true)
        .setVolume(0.5f)
        .addFilter(filter)
        .into(view);
EZFilter.input(camera)
        .addFilter(filter)
        .into(view);
EZFilter.input(camera2)
        .addFilter(filter)
        .into(view);
EZFilter.input(glview)
        .addFilter(filter)
        .into(view);

After calling the into method, you will get a RenderPipeline object, then you can use it for screenshots.

mPipeline.output(new BitmapOutput.BitmapOutputCallback() {
        @Override
        public void bitmapOutput(Bitmap bitmap){
        }
    }, true);
view.requestRender();
    // or
mPipeline.output(new BitmapOutput.BitmapOutputCallback() {
        @Override
        public void bitmapOutput(Bitmap bitmap){
        }
    }, width, height, true);
view.requestRender();

Other functions, such as recording videos, adding dynamic stickers, etc., please refer to demo.

About

A lightweight (<180KB), easy-to-extend Android filter and dynamic sticker framework for adding filters and stickers for camera, video, bitmap and view.(一个轻量级(<180KB)、易扩展的Android滤镜和动态贴纸框架,支持摄像头、视频、图片和视图添加滤镜和贴纸。)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 99.7%
  • GLSL 0.3%