# blend-mode-difference

> given two images returns a blend mode difference

Latest version **1.0.1** (published 2016-06-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install blend-mode-difference
pnpm add blend-mode-difference
yarn add blend-mode-difference
bun add blend-mode-difference
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-06-14 |
| First published | 2016-06-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Paul Campbell |
| Maintainers | paulcampbell |

## Links

- npm: https://www.npmjs.com/package/blend-mode-difference
- Repository: https://github.com/PaulCampbell/blend-mode-difference
- Homepage: https://github.com/PaulCampbell/blend-mode-difference#readme
- Issues: https://github.com/PaulCampbell/blend-mode-difference/issues
- npm.io page: https://npm.io/package/blend-mode-difference

## Recent versions

- 1.0.1 (latest) — 2016-06-14
- 1.0.0 — 2016-06-14

## README

# blend-mode-difference

Given two Buffers of ImageData (one-dimensional array containing the data in the RGBA order),
it will return an ImageData Buffer containing the the blend mode difference of the two images:

```
    const beerData = fs.readFileSync('./test/beer.jpg');
    const noBeerData = fs.readFileSync('./test/no_beer.jpg');
    const rawBeerData = jpeg.decode(beerData);
    const rawNoBeerData = jpeg.decode(noBeerData);

    const blendedImageData = blendModeDifference(rawBeerData.data, rawNoBeerData.data);
    const blendedJpg = jpeg.encode({width: 1200, height: 1600, data: blendedImageData}, 50);
    fs.writeFile('./test/blended.jpg', blendedJpg.data, function() {
      console.log('done');
    })
```

### beer.jpg

<img src="https://raw.githubusercontent.com/PaulCampbell/blend-mode-difference/master/test/beer.jpg" align="left" height="320" width="240" >


### no_beer.jpg

<img src="https://raw.githubusercontent.com/PaulCampbell/blend-mode-difference/master/test/no_beer.jpg" align="left" height="320" width="240" >


### blended.jpg

<img src="https://raw.githubusercontent.com/PaulCampbell/blend-mode-difference/master/test/blended.jpg" align="left" height="320" width="240" >

---
_Source: https://npm.io/package/blend-mode-difference · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
