Giter Site home page Giter Site logo

gthanosai / ezfilter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from uestccokey/ezfilter

0.0 1.0 0.0 60 MB

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: MIT License

Java 99.69% GLSL 0.31%

ezfilter's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.