Code Monkey home page Code Monkey logo

slazzer-android's Introduction

Slazzer-Auto Image Background Remover

  • This is a automatic background remover service just upload an image and get a clear transparent background

Implementation

Add it in your project root build.gradel file

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

Add it in your app label build.gradel file

dependencies {
        implementation 'com.github.slazzercom:slazzer-android:v1.0.0'
}

How to use Slazzer SDK

Initialize the SDK in your project label Application class. Find api key from here

import android.app.Application
import com.anthempest.salesapp.constant.Constants
import com.slazzer.bgremover.Slazzer

class SlazzerApp: Application() {

override fun onCreate() {
    super.onCreate()
    Slazzer.init(Constants.API_KEY)
    
      }
}

Then you can use your image file instaid of inputFile to get output image.

Slazzer.get(inputFile,object :Slazzer.ResponseCallback{
       
        override fun onProgressStart() {
           //  will be invoked on progress start 
        }
        
        override fun onSuccess(response: Bitmap) {
             //  will be invoked when progress done
        }
         override fun onProgressUpdate(percentage: Float) {
            runOnUiThread {
               //  will be invoked when progress update 
            }

        }
        
        override fun onProgressEnd() {
          //  will be invoked when progress end 
        }
        
        override fun onError(errors: String) {
           //  will be invoked when error occurred
        }
})

Request Header


key Request Body Rrequired
API-KEY Enter your API-KEY Mandatory

Request Parameter


key Request Body Rrequired
source_image_file (string($binary) ) Source image file. Support only PNG, JPG, JPEG Mandatory

Error code from response


Code Response Details
200 You will get binary image data after processed Successfully removed image background
400 {"error": "Source image file not found"} Error: Invalid parameters or unable to process input image file (No credit deducted)
401 {"error": "invalid api key"} Error: API-KEY missing or invalid API-KEY (No credit deducted)
402 {"error": "No credits remaining"} Error: No credits remaining (No credit deducted)
429 {"error": "Api rate limit crossed"} Error: Api rate limit crossed (No credit deducted)

Sample Project

You can get complete sample code from this repository. Download the project and replace your API-KEY

Author

slazzercom

slazzer-android's People

Contributors

kamalkantamaity avatar slazzercom 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

Watchers

 avatar

slazzer-android's Issues

Duplicate class

Hello I get the following error when trying to run the app, after adding the SDK to it.
image

Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations found in modules kotlin-stdlib-1.8.21 (org.jetbrains.kotlin:kotlin-stdlib:1.8.21) and kotlin-stdlib-jdk7-1.3.72 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72)
Duplicate class kotlin.jdk7.AutoCloseableKt found in modules kotlin-stdlib-1.8.21 (org.jetbrains.kotlin:kotlin-stdlib:1.8.21) and kotlin-stdlib-jdk7-1.3.72 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72)

Remove Label Free Service

It's not an free service. please dont misguide others. It only let us remove background of 1 image. We have to subscribe their plans for using this service. So please remove that fake 100% free service label from this project.

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.