filterCellEngine.resetTransform();
const myimage = filterCellEngine.getImageData(0, 0, filterCellElement.width, filterCellElement.height);
this.preprocessFilters(this.currentFilters, filterCellElement.width, filterCellElement.height);
const img = filterEngine.action({
identifier: this.filterIdentifier,
image: myimage,
filters: this.currentFilters,
})
if (img) {
filterCellEngine.globalCompositeOperation = SOURCE_OVER;
filterCellEngine.globalAlpha = 1;
filterCellEngine.setTransform(dpr, 0, 0, dpr, 0, 0);
filterCellEngine.putImageData(img, 0, 0);
}
currentEngine.save();
currentEngine.resetTransform();
currentEngine.drawImage(filterCellElement, 0, 0);
currentEngine.restore();
return img;
};