backrem
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i backrem

Weekly Downloads

0

Version

1.1.0

License

ISC

Unpacked Size

23.7 kB

Total Files

27

Last publish

Collaborators

  • volkov97