From ba696ff907d17974953b026b361161f737a6b016 Mon Sep 17 00:00:00 2001 From: Naman Garg <86689556+garg-lucifer@users.noreply.github.com> Date: Mon, 20 Dec 2021 00:46:29 +0530 Subject: [PATCH] Update README.md --- README.md | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 31861d0..fa6663a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # AndroidDocumentFilter -Android Document Filter is an Android Library that allows you to easily add commonly used filters in document image processing, such as Magic Filter, Shadow Remvoal, Black and White Filter, Lighten Color, and GreyScale Filter with just a single line of code. +Android Document Filter is an Android Library that makes it simple to add commonly used filters in document image processing, such as Magic Filter, Shadow Remvoal, Black and White Filter, Lighten Color, and GreyScale Filter. It performs all resource-intensive tasks in the background thread. Screenshots ---------------- @@ -19,21 +19,29 @@ repositories { Then, add the library dependency: ```groovy -implementation 'com.github.garg-lucifer:AndroidDocumentFilter:0.1.0' +implementation 'com.github.garg-lucifer:AndroidDocumentFilter:0.6.0' ``` Usage ---------------- ``` java -// magic filter -Bitmap result = DocumentFilter.getMagicFilter(bitmap); -// shadow removal -Bitmap result = DocumentFilter.getShadowRemoval(bitmap); -// black & white filter -Bitmap result = DocumentFilter.getBlackAndWhiteFilter(bitmap); -// lighten color -Bitmap result = DocumentFilter.getLightenFilter(bitmap); -// greyScale filter -Bitmap result = DocumentFilter.getGreyScaleFilter(bitmap); + +DocumentFilter documentFilter = new DocumentFilter(); + +// replace getFilter_Name with the filter you want to use +documentFilter.getFilter_Name(image_bitmap, new DocumentFilter.CallBack() { + @Override + public void onCompleted(Bitmap bitmap) { + // Do your tasks here with the returned bitmap + } + }); + +// for example shadow removal +documentFilter.getShadowRemoval(image_bitmap, new DocumentFilter.CallBack() { + @Override + public void onCompleted(Bitmap bitmap) { + // Do your tasks here with the returned bitmap + } + }); ``` Thanks ----------------