EDIT : @Ben, forget about downvotes for no reason on your question and ... BE MY GUEST! :
I have never coded before <canvas>, it was a lot of fun. There is currently no bilinear interpolation. I could redo it and add more bells and whistles.
If you want to achieve this effect in javascript, you really need to use a tag <canvas>.
, , .
Flipcode Art of Demomaking: Distortion Bitmap. :) , , <canvas>.
Processing, Processing.js.