Skip to content

Android filter library -This library has 16 filters which can be applied to image bitmaps.

License

Notifications You must be signed in to change notification settings

hgayan7/FilterLibrary

Repository files navigation

Generic badge contributions welcome GitHub contributors Open Source Love

FilterLibrary

Easy to use android image filter library.

Step 1. Add the JitPack repository to your build file

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

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

Step 2. Add the dependency

dependencies 
{
   compile 'com.github.hgayan7:FilterLibrary:0.1.0'
}

Sample code:

ImageView myImageView1,myImageView2;
Bitmap myBitmap1,myBItmap2;

PhotoFilter photoFilter;

myImageView1 = findViewById(R.id.imageView1);
myBitmap1 = BitmapFactory.decodeResource(getResources(),R.drawable.myImage1);

myImageView2 = findViewById(R.id.imageView2);
myBitmap2 = BitmapFactory.decodeResource(getResources(),R.drawable.myImage2);

photoFilter = new PhotoFilter();

// using filter 'one'
myImageView1.setImageBitmap(photoFilter.one(getApplicationContext(),myBitmap1));

// using filter 'sixteen'
myImageView2.setImageBitmap(photoFilter.sixteen(getApplicationContext(),myBitmap2));

Screenshots :

Original image :

Images using filters :

License

  Copyright 2019 Himshikhar Gayan

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.