@coderlife/alpha-mixdeprecated

Tool for merging mask images and background images.

Usage no npm install needed!

<script type="module">
  import coderlifeAlphaMix from 'https://cdn.skypack.dev/@coderlife/alpha-mix';
</script>

README

@coderlife/alpha-mix

Tool for merging mask images and background images.

Demo

Online Demo

demo

Install

npm i -S @coderlife/alpha-mix

Usage

React/Vue usage

import AlphaMix from '@coderlife/alpha-mix"';

VanillaJS usage

<script src="path/to/alpha-mix.min.js"></script>

Initialize

AlphaMix(originImgData, maskImgData, bgImgData), returns result ImageData.

  • originImgData - ImageData - origin ImageData .
  • maskImgData - ImageData - mask ImageData.
  • bgImgData - ImageData - background ImageData.

For example:

var resultImgData = AlphaMix(originImgData, maskImgData, bgImgData)

Like @widgetjs/tree? just 🌟 star the project! Create issues if you find bug.