GitXplorerGitXplorer
P

blend-mode-difference

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
b8037f154233cb91edfc6091b2daea68c4d8a588

readme updates

PPaulCampbell committed 9 years ago
Unverified
47ea4407b90bb33000bc19b50e0924227f7249b6

readme

PPaulCampbell committed 9 years ago
Unverified
c9b8465c0d5bb6e51ba2a2499fb490040cd3dd67

blend mode differences

PPaulCampbell committed 9 years ago

README

The README file for this repository.

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

no_beer.jpg

blended.jpg