Convert photos to Atkinson dithering
30 comments
·June 7, 2025throwanem
The implementation is excellent, and could be slightly improved by giving a default name and .png extension to the downloaded file, by passing a value to the "download" property on the anchor. See https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorE...
57473m3n7Fur7h3
In his defence, that attribute has been available in browsers since March 2017 according to your link [1], whereas the most recent commit in the repo for the dithering tool was in March 2016 by the looks of it.
https://github.com/gazs/canvas-atkinson-dither
He’s still active on GitHub though, in other repos. Maybe he will accept a pull request? :)
[1]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorE...
throwanem
Oh, I assumed it had been recently built and probably posted today by its author given the news and the lack of a year in the title. I'll open a PR.
edit: I might open a PR. 'CoffeeScript...now there's a name I've not heard in a long time. A long time...'
57473m3n7Fur7h3
> CoffeeScript
It was acceptable in the 2010s
It was acceptable at the time
:p
minorbug
Here's one I've been working on and off that lets you convert multiple images to MacPaint in a 400k MFS formatted disk image.
https://github.com/minorbug/mfsjs
I've had this project gathering a light layer of dust in my home directory for a couple months now. I used Gemini Deep Research to help produce the library, and I included the LLM-generated markdown for anyone who wishes to reproduce on other languages, improve upon it, etc.
nedt
Don't click the "as follows" in the info dialog. Looks like this wasn't updated in a while and since then the link became NSFW.
AndrewStephens
This implementation is great and the interface brings back memories.
I was wondering why my Atkinson dithering web-component[0] was getting more hits today - sad news. I’ve always thought that Atkinson dithering produces the nicest images on really crisp monitors like the original Mac - something about it just looks cool and 80s which is why I used it in a game last year.
[0] https://sheep.horse/2023/1/improved_web_component_for_pixel-...
shrinks99
Woah cool web component!
RodgerTheGreat
A similar tool I wrote several years ago: http://beyondloom.com/tools/dith.html
amelius
If you want to do this in Python, there's:
zdw
Interesting that one of the size options is 512x384, not 512x342 which was the original mac resolution.
gcanyon
I think that's not a coincidence.
htk
Thank you for posting this. Very nostalgic!
ksr
Cute UI! GitHub link of demo: https://github.com/gazs/canvas-atkinson-dither
gcanyon
What am I doing wrong? I import a photo, I click save to desktop, and I get an unidentified file in an unknown format.
larodi
Is it the same Atkinson that died today and is this a tribute ?
zahlman
In a sense, but the first commit in the repository was 15 years ago - it's not something that someone whipped up in response to the news.
throwanem
Yes, he invented* the algorithm. One assumes it must be.
* Corrected from 'discovered;' see below.
Still my favorite B&W dither algorithm.
The university had a B&W flatbed scanner attached to a Mac running ... a Hypercard stack? that allowed you to scan an image and get a B&W image.
A clipart book I picked up from the college bookstore and a quick scan and I had a "logo" for the Mac shareware games I started writing in 1988 or so.
At the time I didn't;t realize how really ... nice .. Atkinson's algorithm is. But when, later, I tried dithering with other algos I saw how nice the diffusion was in Bill's code.
More recently I was playing with an eInk calendar project and wanted an "Atkinson-esque" series of images of the Moon in various phases. So I found a site very like the linked one to Atkinson-dither the moon photos I found [1].
[1] see the moon in screenshot: https://github.com/EngineersNeedArt/SystemSix/blob/10f2332b5...