Search

4/28/2008

Ajaxian » An Ajax Ascii Art Generator

Ajaxian » An Ajax Ascii Art Generator
Ajaxian » Asciify: ASCII art library
jsAscii

Utilizing magic and the <canvas> element to turn internet images into sexy ASCII art

最重要的原理是利用 canvas 的 getImageData 取得 raw pixel info, 目前 getImageData 只有在 firefox, webkit nightly build, opera beta 上面有,不過 getImageData 似乎無法應用在 remote image, firebug會出現下面的security error
Security error" code: "1000
[Break on this error] var oImgData = oCtx.getImageData(0, 0, iWidth, iHeight).data;
demo:
http://chunghe.googlecode.com/svn/trunk/project/jsascii/asciify.remote.image.htm
http://chunghe.googlecode.com/svn/trunk/project/jsascii/asciify.local.image.htm

沒有留言: