Closed IamMille closed 2 years ago
That stream also has a data
property (per pngjs
docs), so the example works as expected.
pixelmatch(img1.data, img2.data, diff.data, width, height, {threshold: 0.1});
@gsouf 🤷♂️ you could submit an issue to pngjs, but their docs are clear: https://github.com/lukeapage/pngjs#pngsyncreadbuffer
@mourner sorry I just made something wrong and because I found this 3 days old issue I just assumed there was a recent bug
In the Node.js example, it seems like the
const diff = new PNG({width, height});
returns a stream, hence the error.