Image Data - Black and White Example
HTML5 and JavaScript are used to create a black and white version of the original image. Using a 'luminance' algorithm of: 0.3*red + 0.59*green + 0.11*blue
Here is the zipped 'source code'
See also this article, by Tanner Helland. It offers a good presentation of various methods to convert an image to greyscale - and the reasoning behind each.