1.1.0 • Published 10 years ago

htmlimage v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

HTMLImageElement

A standalone image element doing HTMLImageElement related things, on node.js

install

npm install htmlimage

use

NOTE: this library currently only works with png files

var Image = require('htmlimage').HTMLImageElement;

var i = new Image();

i.onload = function() {

  // do something with image.imageData.data (which is a pixel buffer)

};

i.onerror = function(err) {
  // OHNOEZ!
}

i.src = "http://domain.tld/path/to/file.png";

license

MIT