How to use the png-js.load function in png-js

To help you get started, we’ve selected a few png-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github devilesk / dota-interactive-map / www / bundle.js View on Github external
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) {

png-js

A PNG decoder in JavaScript

MIT
Latest version published 5 years ago

Package Health Score

66 / 100
Full package analysis

Popular png-js functions

Similar packages