frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Convert photos to Atkinson dithering

https://gazs.github.io/canvas-atkinson-dither/
173•nvahalik•3h ago

Comments

JKCalhoun•3h ago
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...

larodi•3h ago
Is it the same Atkinson that died today and is this a tribute ?
throwanem•3h ago
Yes, he invented* the algorithm. One assumes it must be.

* Corrected from 'discovered;' see below.

zahlman•3h ago
Invented the algorithm. The choice and arrangement of weights is a matter of fine-tuning to balance practical concerns - not some natural law of mathematics that could be figured out.
4b11b4•3h ago
That's a good clarification
throwanem•2h ago
I appreciate the correction.
zahlman•3h ago
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•3h ago
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•2h ago
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•2h ago
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•2h ago
> CoffeeScript

It was acceptable in the 2010s

It was acceptable at the time

:p

https://www.youtube.com/watch?v=dOV5WXISM24

throwanem•1h ago
Nor have I said there is anything wrong with it, only that it's been a long time. So reflexively to equate calling something old with calling it bad seems like a young man's game, but it has been some time since I had close experience of being one of those, also.
57473m3n7Fur7h3•1h ago
It’s a reference to the linked song. One of my favorite songs :D
amelius•3h ago
If you want to do this in Python, there's:

https://github.com/tgray/hyperdither

ddingus•3h ago
I just converted my home stereo. Pioneer, so lots of brushed metal. It looks really great at 2560x1440. Great dither.
AndrewStephens•3h ago
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-...

ksr•2h ago
Cute UI! GitHub link of demo: https://github.com/gazs/canvas-atkinson-dither
nedt•2h ago
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.
gcanyon•1h ago
What am I doing wrong? I import a photo, I click save to desktop, and I get an unidentified file in an unknown format.
busymom0•1h ago
I believe the file is missing a name and extension. If you rename the file with .png extension, then it works.
kgbcia•1h ago
Would be great for eink/epaper devices.
9d•1h ago
Sorry but where did you get the JS/CSS for this? It's so small.
minorbug•58m ago
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.

zdw•26m ago
Interesting that one of the size options is 512x384, not 512x342 which was the original mac resolution.
RodgerTheGreat•18m ago
A similar tool I wrote several years ago: http://beyondloom.com/tools/dith.html

Convert photos to Atkinson dithering

https://gazs.github.io/canvas-atkinson-dither/
173•nvahalik•3h ago•25 comments

Bill Atkinson has died

https://daringfireball.net/linked/2025/06/07/bill-atkinson-rip
907•romanhn•7h ago•177 comments

Joining Apple Computer

https://www.folklore.org/Joining_Apple_Computer.html
59•tosh•3h ago•11 comments

Self-Host and Tech Independence: The Joy of Building Your Own

https://www.ssp.sh/blog/self-host-self-independence/
102•articsputnik•6h ago•26 comments

BorgBackup 2 has no server-side append-only anymore

https://github.com/borgbackup/borg/pull/8798
100•jaegerma•5h ago•61 comments

Coventry Very Light Rail

https://www.coventry.gov.uk/coventry-light-rail
22•Kaibeezy•2h ago•12 comments

My experiment living in a tent in Hong Kong's jungle

https://corentin.trebaol.com/Blog/8.+The+Homelessness+Experiment
132•5mv2•7h ago•50 comments

Don't Panic, but Douglas Adams Predicted a Lot of This

https://krisstgabriel.substack.com/p/dont-panic-but-douglas-adams-predicted
6•wrongcards•48m ago•0 comments

You need much less memory than time

https://blog.computationalcomplexity.org/2025/02/you-need-much-less-memory-than-time.html
44•jonbaer•2h ago•6 comments

What was Radiant AI, anyway?

https://blog.paavo.me/radiant-ai/
141•paavohtl•10h ago•89 comments

Updates to Advanced Voice Mode for paid users

https://help.openai.com/en/articles/6825453-chatgpt-release-notes
26•mfiguiere•3h ago•22 comments

The time bomb in the tax code that's fueling mass tech layoffs

https://qz.com/tech-layoffs-tax-code-trump-section-174-microsoft-meta-1851783502
1290•booleanbetrayal•3d ago•805 comments

Discovering a JDK Race Condition, and Debugging It in 30 Minutes with Fray

https://aoli.al/blogs/jdk-bug/
43•aoli-al•5h ago•7 comments

Washington Post's Privacy Tip: Stop Using Chrome, Delete Meta Apps (and Yandex)

https://tech.slashdot.org/story/25/06/07/035249/washington-posts-privacy-tip-stop-using-chrome-delete-metas-apps-and-yandex
242•miles•7h ago•129 comments

Low-Level Optimization with Zig

https://alloc.dev/2025/06/07/zig_optimization
229•Retro_Dev•16h ago•112 comments

Field Notes from Shipping Real Code with Claude

https://diwank.space/field-notes-from-shipping-real-code-with-claude
37•diwank•5h ago•2 comments

Why We're Moving on from Nix

https://blog.railway.com/p/introducing-railpack
192•mooreds•12h ago•84 comments

Researchers develop ‘transparent paper’ as alternative to plastics

https://japannews.yomiuri.co.jp/science-nature/technology/20250605-259501/
368•anigbrowl•1d ago•231 comments

OneText (YC W23) Is Hiring a DevOps/DBA Lead Engineer

https://jobs.ashbyhq.com/one-text/b95952a2-9bc2-4c3a-9da1-3dcc157b4a27
1•bluepnume•7h ago

A tool for burning visible pictures on a compact disc surface

https://github.com/arduinocelentano/cdimage
125•carlesfe•15h ago•46 comments

Hate Radio (2011)

https://rwandanstories.org/genocide/hate_radio.html
124•thomassmith65•9h ago•104 comments

Why Understanding Software Cycle Time Is Messy, Not Magic

https://arxiv.org/abs/2503.05040
4•SiempreViernes•3h ago•1 comments

Getting Past Procrastination

https://spectrum.ieee.org/getting-past-procastination
285•WaitWaitWha•21h ago•132 comments

Math Symbol Frequencies

https://leancrew.com/all-this/2025/06/math-symbol-frequencies/
16•tosh•3h ago•6 comments

The FAIR Package Manager: Decentralized WordPress infrastructure

https://joost.blog/path-forward-for-wordpress/
179•twapi•19h ago•43 comments

How we decreased GitLab repo backup times from 48 hours to 41 minutes

https://about.gitlab.com/blog/2025/06/05/how-we-decreased-gitlab-repo-backup-times-from-48-hours-to-41-minutes/
510•immortaljoe•1d ago•215 comments

Musk-Trump dispute includes threats to SpaceX contracts

https://spacenews.com/musk-trump-dispute-includes-threats-to-spacex-contracts/
141•rbanffy•10h ago•268 comments

I read all of Cloudflare's Claude-generated commits

https://www.maxemitchell.com/writings/i-read-all-of-cloudflares-claude-generated-commits/
205•maxemitchell•1d ago•200 comments

A year of funded FreeBSD development

https://www.daemonology.net/blog/2025-06-06-A-year-of-funded-FreeBSD.html
337•cperciva•1d ago•110 comments

PyOpticL – Code-to-CAD optical system engineering

https://github.com/UMassIonTrappers/PyOpticL
14•cinquemb•7h ago•1 comments