How My Images Are Dithered - Simulating Halftone Printing with ImageMagick

TL;DR
How to simulate AM halftone printing with ImageMagick: CMYK channel splits, rotated dot screens and a batch script, plus the HN dithering vs halftoning debate.
Last updated: July 26, 2026
A personal blog post about simulating printed halftone patterns in digital images climbed to the top of Hacker News on July 25. Authored by Johanna-Mathilda Langenhan (Jo), the post walks through several iterations of using ImageMagick to recreate the look of amplitude-modulated (AM) halftone screens -- the dot patterns you see in newspapers and offset printing.
The post racked up 195 points and 70 comments, with HN readers weighing in on the technical merits, terminology, and practical applications of the technique.
What the post covers#
Jo's goal was to make digital images look like they came off a printing press. The core technique uses ImageMagick's convert to split an image into CMYK channels, apply rotated dot screens (at 0, 15, 45, and 75 degrees per the DIN 16547 standard), and recombine them into a halftoned result.
The post is unusually transparent about its limitations. Jo explicitly states they "don't know much about dithering" and documents three generations of the approach:
- The pink monochrome method: Convert to CMYK, apply AM dot screens, convert to grayscale, then level to two colors (black and pink). Produces a stylized pink-tinted print look but can swallow detail.
- The true CMYK method: Same pipeline but with
-colors 2per channel before recombination. Produces properly varying dot sizes and a more authentic print feel. The author admits this was an "obvious in hindsight" fix. - The multi-pink method: Uses
-remapwith a custom palette to get multiple shades of pink while keeping the AM grid structure.
The shell script at the bottom of the post processes all images in a directory through the CMYK AM pipeline, outputting 64-color halftoned versions. Jo notes it takes about 10 seconds per large image on an 11-year-old CPU and warns bluntly: "If you value your time or care about actually reducing an image's size do not do this."
What HN is saying#
The HN discussion centered on a few themes:
Dithering vs halftoning: Several commenters pushed back on the terminology. Retr0id kicked off the thread: "I suppose it is a type of dithering, but really this is Halftoning." ValdikSS was more direct: "This is halftoning, not dithering." Jo added an edit responding to the debate, citing Wikipedia's note that the terms are sometimes used interchangeably in digital printing contexts.
The technical craft: AndrewStephens appreciated the aesthetic: "Very nice results, I really like the way it looks like a printed page. Image processing is addictive - once you start playing around it is hard to stop." trentor, a former rotogravure printer, shared a nostalgic perspective: "In intaglio printing you usually don't see these patterns because the electrostatic assist pulls the ink out of the cells."
Practical applications: rahimnathwani connected the technique to DTF (direct to film) t-shirt printing. ipunchghosts wondered why dithering isnt used more as a data augmentation method for training deep networks: "It would allow the networks to learn invariants that align with humans."
File size skepticism: ReactiveJelly pushed back on the claim that dithering reduces file size: "If you're compressing photos, you should use JPEG or WebP. Anecdotally, JPEG usually beats dithering, and WebP always does." Jo had already addressed this in the post, noting the technique is for aesthetics, not optimization.
Why it matters#
This post hit the front page for a few reasons that reflect what HN values in 2026.
First, the technical depth is real. Jo shares the exact ImageMagick commands, explains the reasoning behind each flag, and shows before/after comparisons. This is rare on the modern web, where most image-processing content is abstract or locked behind APIs. A developer in 2026 can run the exact same commands on their machine and get reproducible results.
Second, the post models good engineering documentation. Each iteration is clearly motivated: what changed, why it changed, and what the output looks like. The "Edit: The perfect route to CMYK" section is a textbook example of sleeping on a problem and arriving at a cleaner solution.
Third, the technical nuance (AM vs FM halftoning, Moire patterns, the 4-color rotation standard) surfaces real image-processing knowledge that most web developers never touch. Understanding how printers reproduce continuous-tone images is one of those pieces of foundational CS knowledge that keeps resurfacing.
If you work with images at scale -- whether you are optimizing assets for web performance, building AI image generation pipelines, or just want your personal blog to look like a printed zine -- understanding halftoning and dithering fundamentals gives you a tool most developers do not have.
FAQ#
Is this technique dithering or halftoning?#
Several HN commenters argued it is halftoning rather than dithering. Jo responded with an edit citing Wikipedia's note that the two terms are sometimes used interchangeably in digital printing contexts. The technique itself recreates amplitude-modulated (AM) halftone screens, the dot patterns seen in newspapers and offset printing.
How do you simulate halftone printing with ImageMagick?#
The core pipeline uses ImageMagick's convert to split an image into CMYK channels, apply rotated dot screens at 0, 15, 45, and 75 degrees per the DIN 16547 standard, and recombine them. The true CMYK variant adds -colors 2 per channel before recombination, which produces properly varying dot sizes.
Does dithering an image reduce its file size?#
Not in a useful way, according to the post. Jo warns not to use the technique to reduce an image's size, and it takes about 10 seconds per large image on an 11-year-old CPU. On HN, ReactiveJelly added that JPEG usually beats dithering for photos and WebP always does. The goal here is aesthetics, not optimization.
Sources#
- Original post: How My Images Are Dithered
- Hacker News discussion: https://news.ycombinator.com/item?id=49006096
- Wikipedia: Dither and Halftone
- DIN 16547 - Printing technology standard for screen angles
Continue Reading#
- Image Token Compression and Agent Costs - How image processing affects AI agent pipelines
- AI Design Slop and How to Spot It - Understanding technical artifact generation
- Good Tools Are Invisible - Building tools that just work
- Hacker News - All HN analysis posts
- Developer Tools - Tools and techniques for better engineering
Get the next deep dive like this in your inbox
One email a week on News and the rest of the AI dev stack. Free.
Read next on AI coding tools
PGSimCity: A 3D Interactive City That Visualizes How PostgreSQL Works
PGSimCity is a 3D city that visualizes PostgreSQL internals - shared buffers, WAL, autovacuum, checkpoints and replication. How it works and what HN said.
9 min readOuter Shell: A Graphical Desktop for Your Remote Server via SSH
Outer Shell proposes a graphical desktop for remote servers over SSH, with apps served on Unix domain sockets. How it works, the HN debate and who it is for.
8 min readMitchell Hashimoto on Building Ghostty in Zig: Simplicity, Control, and Terminal Performance
Mitchell Hashimoto on building Ghostty in Zig: why he chose Zig over Rust, how the GPU-first terminal is architected, and what Hacker News made of it.
7 min readNew here? Start with
Technical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.








