forked from bgamari/infragram-js
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
It'd work like this:
// Initialize
var ig = new Infragram({webgl: false});
// Load an image:
ig.load('img.jpg');
// OR load an image object:
var img = new Image();
// stuff
ig.load(img);
// Now set an infragrammar expression:
ig.apply('(R+G)/(R-G)');
// Get the resulting image back out as an Image object or otherwise:
ig.export();
ig.exportDataUrl();
// All in one step:
ig.filter('(R+G)/(R-G)', img);
// Or to filter and automatically replace an image element on a web page:
ig.filter('(R+G)/(R-G)', 'elementId');
And use https://github.com/Automattic/node-canvas to make runnable in NodeJS, and maybe even WebGL: https://github.com/mikeseven/node-webgl
If we did this, we'd be able to:
- process images in MapKnitter on the fly
- apply a composite in real time to a tileset, perhaps as a Leaflet plugin
- run the whole thing on the commandline on a video file
Metadata
Metadata
Assignees
Labels
No labels