https://github.com/flet/trippyshift
https://github.com/flet/trippyshift
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/flet/trippyshift
- Owner: Flet
- License: isc
- Created: 2014-08-26T05:13:53.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-08-28T21:21:29.000Z (almost 11 years ago)
- Last Synced: 2024-04-22T23:45:29.681Z (about 1 year ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
trippyshift
===========This module takes a buffer holding an image and uses graphicsmagick to overlay an offset second copy of the image while applying the "Add" composite operator.
install:
```
npm install trippyshift --save
```usage:
```
var fs = require('fs'),
trippyshift = require('trippyshift');var wooo;
fs.readFile('./file.jpg', function (err, data) {
wooo = data;
trippyshift({}, data, writeToDestination);
});function writeToDestination(err, trippedOutBuf) {
if (err) throw err;
fs.writeFileSync('./output.jpg', trippedOutBuf);
};
```an `options` object with `shiftXMaxPercent` and/or shiftYMaxPercent can be passed in optionally as the first argument.