A while ago I wrote a similar library, running on the GPU using WebGL[1].<p>It&#x27;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.<p>[1] <a href="http:&#x2F;&#x2F;phoboslab.org&#x2F;log&#x2F;2013&#x2F;11&#x2F;fast-image-filters-with-webgl" rel="nofollow">http:&#x2F;&#x2F;phoboslab.org&#x2F;log&#x2F;2013&#x2F;11&#x2F;fast-image-filters-with-web...</a>