Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have done this below code into JAVA project. but didn't work. #14

Open
jinkalzalavadiya opened this issue Feb 21, 2024 · 4 comments
Open

Comments

@jinkalzalavadiya
Copy link

 RemoveBg removeBg = new RemoveBg(CutOutActivity.this);

  removeBg.clearBackground(bitmap).collect(new FlowCollector<Bitmap>() {
            @org.jetbrains.annotations.Nullable
            @Override
            public Object emit(Bitmap bitmap, @NonNull Continuation<? super Unit> continuation) {
              
                return null;
            }
        }, new Continuation<Unit>() {
            @NonNull
            @Override
            public CoroutineContext getContext() {
                return null;
            }

            @Override
            public void resumeWith(@NonNull Object o) {

            }
        });

Please check above is there any issues?

Thank you.

@YueDev
Copy link

YueDev commented Feb 29, 2024

execute the following code on a worker thread

    Bitmap bitmap = yourBitmap.copy(Bitmap.Config.ARGB_8888, true);
    Bitmap result = removeBg.removeBackground(bitmap);
    if(result != null) {
        //success
    } else {
        //error
    }

@jinkalzalavadiya
Copy link
Author

removeBg.removeBackground(bitmap);
This will not return bitmap. It will return like that

Flow<Bitmap> bitmap1 = removeBg.clearBackground(bitmap);

Have you implement on your JAVA project?

@YueDev
Copy link

YueDev commented Mar 20, 2024

@hamzakhalil798
Copy link

@YueDev Hey! sorry im new to this can you explain if this library works with java?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants