function readPNG()

in common/compareImage.js [5:17]


function readPNG(path) {
  return new Promise((resolve) => {
    fs.createReadStream(path)
      .pipe(new PNG())
      .on('parsed', function () {
        resolve({
          data: this.data,
          width: this.width,
          height: this.height
        });
      });
  });
}