Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ImageHandler.prototype.load = function (callback) {
var self = this;
var t1 = Date.now();
self.canvas = document.createElement("canvas");
PNG.load(this.imagePath, self.canvas, function(png) {
self.png = png;
self.ctx = self.canvas.getContext("2d");
callback();
});
}
ImageHandler.prototype.scan = function (offset, width, height, pixelHandler, grid) {