You can achieve the effect by drawing the image on a canvas and then manipulate the pixels using JavaScript.
You can achieve pretty much anything. Here's an example of some waves: http://lislis.sakura.ne.jp/canvas/wave/wave02.html
Converting image to greyscale: http://www.html5canvastutorials.com/advanced/html5-canvas-grayscale-image-colors-tutorial/