Skip to content

technicaldee/removebg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Background Removal API

A simple Node.js API that removes backgrounds from images and returns the result as a base64 string.

Features

  • Upload images via API endpoint
  • Process images to remove backgrounds using @imgly/background-removal-node
  • Return processed images as base64 strings
  • Simple web interface for testing

Installation

  1. Clone this repository
  2. Install dependencies:
npm install

Usage

Start the server

npm start

The server will run at http://localhost:3000

API Endpoint

POST /remove-background

Upload an image file with the key 'image' in a multipart/form-data request.

Example using curl:

curl -X POST -F "image=@/path/to/your/image.jpg" http://localhost:3000/remove-background

Example response:

{
  "base64Image": "iVBORw0KGgoAAAANSUhEUgAA..." // base64 encoded image data
}

Web Interface

A simple web interface is available at http://localhost:3000 for testing the API.

Dependencies

  • express - Web server framework
  • multer - File upload handling
  • @imgly/background-removal-node - Background removal library
  • cors - Cross-origin resource sharing

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors