Code Monkey home page Code Monkey logo

android-cutout's People

Contributors

gabrielbb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-cutout's Issues

How to remove auto background from image

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 determine all dependencies

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 to select pic from camera or gallary

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.

bug on scale type

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.

Question: resizeBitmap

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?

Edit Text on Image

can we give option user to put text on image ? something like Instagram ? please reply if anyone can help in this thank you.

Getting error while adding dependency

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

Remove only neighboring pixel

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?

Not working probably!

i did every thing but when i run it its flashing one time only, i use kotlin, any suggestions plz ?

Please Update your Android-CutOut library

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 -

Error in adding dependency in my project

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' } }

Automatic remove background

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?

NoSuchMethodError when trying to use CutOut

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

Problem when saving picture

When I save the image that background of it has been deleted. The image appears in the gallery with a black background instead of a transparent background.

Before deleting the background:
screenshot_ - 1
After deleting the background:
screenshot_ - 1
The image in the gallary:
screenshot_ - _gallery 1

Draw Functionality!

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.

Is there ads thing implemented in your app ?

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 !

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.