Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

backrem

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backrem

Tool to replace "plain-color" background on images.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Backrem

Tool to replace "plain-color" background on images.

This tool provides a function called replaceBackground. This function has 2 required arguments and 2 optional:

  1. Image to replace background (readable stream)
  2. Background image (readable stream, should have the same size as image in first argument)
  3. Color to detect background (array of 3 numbers RGB)
  4. Threshold - number from 0 to 100, where 0 means to replace only color from third argument, higher means similarity of colors

Read more about colors similarity here: https://stackoverflow.com/questions/13586999/color-difference-similarity-between-two-values-with-js

This function returns readable stream with result image.

You can also see working example in example directory.

FAQs

Package last updated on 01 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc