No description, website, or topics provided.
CoffeeScript HTML
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE.md
README.md
atkinson.coffee
avatar.png
default.png
index.html
webcam.coffee
webcam.html
worker.coffee

README.md

Atkinson dithering example using Canvas, WebWorkers and FileReader

The classic Macintosh 1-bit filter, as used by Hyperdither

Compares every pixel to 50% grey, then changes them to either black or white. The difference between the input and the output is then distributed to the neighbouring pixels as follows (X is the current pixel):

     X  1/8 1/8
1/8 1/8 1/8
    1/8

This code uses Drag and Drop events, WebWorkers and the FileReader API so you'll need a current browser to try it.

(Oh, and of course, CoffeeScript, to compile the files into JS)