Node module and CLI tool for perceptual differentiation
npm install pdiffer#NOTE: this project is work in progress.
npm install
export CDN_USERNAME=CDN_USERNAME_HERE
export CDN_PASSWORD=CDN_PASSWORD_HERE
`CLI
`sh
Pull baseline images
pdiff pull Push new baseline images
pdiff pull `API
`
var compare = require('compare');// Convert encoded string to image
var png = "...";
var image = compare.parseStringToPNG(png);
// Compare to image strings for visual differences
var diff = compare.imageDiff(png, "...");
`Troubleshooting
When running npm install I received
`
Package xcb-shm was not found in the pkg-config search path.
Perhaps you should add the directory containing xcb-shm.pc'I had to export the following environment variable
`
export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig
``