Today, HTML5-compatible browsers already provide bilinear filtering on <canvas> and in WebGL for images when you resize the graphics.
This shader is a quick port to C2 of the GLSL shader from there :
The bilinear filter works in both directions (image magnification and shrinking).
It works with 4 parameters :
The Texture Width Size is the new width you want to have, Texture HeightSize is the new height, the X pixel size must be set to 1.0/Texture Width, and the same for Y pixel size (1.0/Texture Height).
You get that kind of after/before effect (however no hope of regrowing your hairs back with a shader...):
The demo : https://dl.dropbox.com/u/1412774/WebGLBilinearEffectDemo/index.html
The effect .zip archive : https://dl.dropbox.com/u/1412774/WebGLBilinearEffectDemo/pode_bilinear_filter.1.0.zip (put it inside the effects folder !
The .capx : https://dl.dropbox.com/u/1412774/WebGLBilinearEffectDemo/WebGLBilinearEffectDemo.capx