Applying XML filter to an image using HTML5 canvas and JS