Grafi.js – JavaScript Image Processing Library
grafijs.org
grafijs.org
"grafi.js is a library intended for learning about how image processing works"
new Uint8ClampedArray(ndarray.data);It was absolutely fantastic; really great information about image data & how to process it.
they code is pretty rough & documentation is not great
There are much better tutorials out there for image processing:
http://www.html5rocks.com/en/tutorials/canvas/imagefilters/And even if I programmatically insert inline CSS, there's always the compatibility issues and filter restrictions.
http://evanw.github.io/webgl-filter/
https://v3.polarr.co/ (this one seems to be the only real company instead of a demo)
I'm well versed in imagemagick to such a degree that I stopped taking on projects that would have to use it. Which is a large subset of projects. Now that I'm primarily Node and Javascript focused I'll bring this up next time.
It's interesting how the library just became a _wrapper_ around 3 very simple pixel shaders (color matrix, convolution and blur), with the GPU doing all the looping over each pixel for you. Imho the shaders explain the idea of each filter much more clearly than iterative code could.
[1] http://phoboslab.org/log/2013/11/fast-image-filters-with-web...
Uncaught exception: DOMException: NOT_SUPPORTED_ERR Error thrown at line 58, column 6 in formatter(pixelData, width, height) in http://grafijs.org/grafi.js: return new window.ImageData(pixelData, width, height) called from line 471, column 4 in invert(imgData) in http://grafijs.org/grafi.js: return formatter(newPixeldata, imgData.width, imgData.height) called from line 147, column 4 in <anonymous function: $img.onload>() in http://grafijs.org/: imageCtx.putImageData(grafi.invert(original), 0, 0)
If you hop down to the annotated source, you can see Uint32Array used here: