https://github.com/theapache64/remove-bg
🖼️ Remove photo background with just a tap
https://github.com/theapache64/remove-bg
Last synced: about 2 months ago
JSON representation
🖼️ Remove photo background with just a tap
- Host: GitHub
- URL: https://github.com/theapache64/remove-bg
- Owner: theapache64
- Created: 2019-05-21T09:23:39.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-01-31T05:32:36.000Z (about 6 years ago)
- Last Synced: 2025-08-05T00:14:11.617Z (9 months ago)
- Language: Kotlin
- Homepage: http://remove.bg
- Size: 6.76 MB
- Stars: 215
- Watchers: 7
- Forks: 32
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# remove-bg
Remove.bg is a free service to remove the background of any photo. It works 100% automatically: You don't have to manually select the background/foreground layers to separate them - just select your image and instantly download the result image with the background removed!

## Installation
```gradle
implementation 'com.theapache64.removebg:removebg:1.0.0'
```
### Usage
Initialize the SDK from your `Application` class. You can get your key from [here](https://www.remove.bg/profile#api-key)
```kotlin
import android.app.Application
import com.theapache64.removebg.RemoveBg
class App : Application() {
override fun onCreate() {
super.onCreate()
RemoveBg.init("YOUR-API-KEY")
}
}
```
and you can use it like this
```kotlin
RemoveBg.from(imageFile, object : RemoveBg.RemoveBgCallback {
override fun onProcessing() {
// will be invoked once finished uploading the image
}
override fun onUploadProgress(progress: Float) {
// will be invoked on uploading
}
override fun onError(errors: List) {
// will be invoked if there's any error occurred
}
override fun onSuccess(bitmap: Bitmap) {
// will be invoked when background removed
}
})
```
### Example
This repository contains a complete example of the SDK.
Download the project and compile with your [API-KEY](https://www.remove.bg/profile#api-key).
### Author
theapache64