A Golang API wrapper for removing background using remove.bg's API
This code is licensed under the GPL3 License. See here for more details.
go get github.com/g-lib/removebg@latest
Removes the background given an image file.
import "github.com/g-lib/removebg"
rmbg = NewRemoveBg("YOUR-API-KEY")
rmbg.RemoveFromFile("test.jpg",nil)
Removes the background given an image URL.
import "github.com/g-lib/removebg"
rmbg = NewRemoveBg("YOUR-API-KEY")
rmbg.RemoveFromURL("http://www.example.com/some_image.jpg",nil)
Removes the background given a base64 image string.
import "github.com/g-lib/removebg"
rmbg = NewRemoveBg("YOUR-API-KEY")
rmbg.RemoveFrombBase64("BASE64-CONTENT",nil)