input = {
const baseUrl =
"https://raw.githubusercontent.com/mapbox/pixelmatch/master/test/fixtures/";
const img1 = images.startimage;
const img2 = images[`currentimage_${sample}`];
const { width: w, height: h } = img1;
const ctx = DOM.context2d(w, h, 1);
ctx.drawImage(img1, 0, 0);
const data1 = ctx.getImageData(0, 0, w, h).data;
ctx.drawImage(img2, 0, 0);
const data2 = ctx.getImageData(0, 0, w, h).data;
const diff = ctx.createImageData(w, h);
return { img1, img2, w, h, data1, data2, ctx, diff };
}