While following the Javascript Masterclass, some examples poped up about using prototype on native objects. An implementation of curry was added to javascript, just as some other usefull features. This reminded me of a prototype a colleague of mine ones made for a format function. Format does replace values in a string. A bit like… Read More

Cropping an image function cropImage() { var canvas=document.getElementById(“myCanvas”); var c=canvas.getContext(“2d”); var imageObj = new Image(); imageObj.onload = function() { // draw reference image c.drawImage(imageObj,50,30, 438, 300); // draw cropped image var sourceX = 150; var sourceY = 0; var sourceWidth = 150; var sourceHeight = 150; var destX = 370; var destY = 220; var… Read More

What is a convolution matrix? It’s possible to get a rough idea of it without using mathematical tools that only a few ones know. Convolution is the treatment of a matrix by another one which is called “kernel”. The Convolution Matrix filter uses a first matrix which is the Image to be treated. The image… Read More

CSS bloat happens to all of us. Sometimes it’s our own fault, sometimes it legacy code. Whatever the reason, bloat is a diseas that needs cureing. At the moment, I’m trying to clean up a some large css files and an easy cure is not in sight. As I’m planning on doing this thorough, I’ve… Read More