gabrielbb / android-cutout Goto Github PK
View Code? Open in Web Editor NEWAndroid image background removing library
License: Other
Android image background removing library
License: Other
auto background not working, manual works perfectly please check this again i am using android 9.0
Execution failed for task ':app:processDebugMainManifest'.
I want to remove background from image automatically not on touch (on click of single button). Your automatic background cleaning is removing background but still it required touch on display. Do you have any idea how to implement this functionality? Anyone, please help me.
Could not find com.github.apl-devs:appintro:v4.2.3.
Could not find com.github.jkwiecien:EasyImage:1.3.1.
Is there anyway i can bypass this error?
Advance thanks gabriel
How I can select JPEG image from storage or Camera and than remove background and save them into storage. Please help me I am beginner so I didn't understand. I hope will you help me. Thanks in advance.
Can you add erase mode, erase the drawn lines of manual mode, thanks
Thanks for your great library.
Can I use this library with Picasso?
Otherwise, do you have any plan for this?
Hello,
I noticed that images are scaled in a way that their width will match the screen width. This cause the top and bottom part of long images to be left out.
Hi, from the source code it seems that when the DrawView size is changed the image bitmap is resized. I think it's possible to directly draw the original scaled bitmap on Canvas like you did in resizeBitmap
canvas.drawBitmap(bitmap, transformation, paint);
Is there any reason to create another bitmap from the original one for resizing?
can we give option user to put text on image ? something like Instagram ? please reply if anyone can help in this thank you.
I am getting following errors while adding dependency.
Failed to resolve: com.github.apl-devs:appintro:v4.2.3
Failed to resolve: com.github.jkwiecien:EasyImage:1.3.1
when I convert project into androidx, I am getting Error in mainfest. Can you help me?
can you extract 'Eraser size' text to string file?
I have a logo with some white text color with white background, if i use the automatic background clearing function, the white text also been removed. Can we delete only the solid background color without touching the inside element of the logo?
i did every thing but when i run it its flashing one time only, i use kotlin, any suggestions plz ?
Hi,
I have been using your Android-CutOut library since 2019. Now it's not working on the new version of the android device. Can you please update the library to support the new android phones?
thanks -
I am not able to use this library also wasted a lot of time trying to add this, please help I cannot wait.
Could not HEAD 'https://www.jitpack.io/com/github/gabrielbb/cutout/0.1.2/cutout-0.1.2.pom'. Received status code 401 from server: Unauthorized Disable Gradle 'offline mode' and sync project
Already tried:
this, implementation group: 'com.github.gabrielbb', name: 'cutout', version: '0.1.2'
and this, implementation 'com.github.gabrielbb:cutout:0.1.2'
Also removed jcenter() and also tried adding this:
allprojects { repositories { google() mavenCentral() maven { url 'https://www.jitpack.io' } }
Hello, After API28 Camera is not working. Gallery part is working fine.
I want to remove background directly not on Display touch (Simple click on one button). I saw your automatic background clear but it still require display touch. How can i achieve auto background remove on single button click? Do you have any idea how to achieve it?
Hello Gabriel,
First I would just like to say thanks for developing this, I have a number of different projects that I would like to incorporate CutOut into, but I'm getting an issue whenever I try to start the CutOut activity. Any help I could get in making this work with my project would be awesome, and I would appreciate it.
My error output:
2020-10-29 15:42:33.510 26017-26017/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.backgroundremovalexample, PID: 26017
java.lang.NoSuchMethodError: No static method metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; in class Ljava/lang/invoke/LambdaMetafactory; or its super classes (declaration of 'java.lang.invoke.LambdaMetafactory' appears in /apex/com.android.art/javalib/core-oj.jar)
at com.github.gabrielbb.cutout.CutOutActivity.setUndoRedo(CutOutActivity.java:298)
at com.github.gabrielbb.cutout.CutOutActivity.onCreate(CutOutActivity.java:116)
at android.app.Activity.performCreate(Activity.java:8000)
at android.app.Activity.performCreate(Activity.java:7984)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
My MainActivity.java:
package com.example.backgroundremovalexample;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import com.github.gabrielbb.cutout.CutOut;
public class MainActivity extends AppCompatActivity {
private Button button;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
button = findViewById(R.id.button_start_cutout);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Uri uri = Uri.parse("/sdcard/Download/21110378192_ccd70526ed_o.jpg");
CutOut.activity().src(uri).intro().start(MainActivity.this);
}
});
My Gradle file (app):
apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.example.backgroundremovalexample"
minSdkVersion 22
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
implementation 'com.github.gabrielbb:cutout:0.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
My Gradle file (Project):
/ Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.2"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Thanks for any guidance you can give me! Look forward to hearing from you.
-Zaphelyn
Hello, hope you're doing well, your project is awesome and working perfectly fine but just want to know that how can we get the drawn area only of the image as you're removing the drawn area in your manual cut option. Please do tell me ASAP if anyone knows the solution!
Thanks & Regards.
Cannot make border option work. Could you please give us an example?
I downloaded the app to try it , and since then ads keep poping up , it's really annoying , they're still showing even though i've deleted the app ! Please tell me how to stop it !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.