> Dithering can reduce file size
Yeah, if you're using lossless compression like PNG or GIF, adding a lossy step to reduce the number of colors in the palette can help.
If you're compressing photos, you should use JPEG or WebP.
Anecdotally, JPEG usually beats dithering, and WebP always does.
It's fine to dither images but please please admit that you're doing it for the aesthetic. WebP has very broad browser support and absolutely blows dithering out of the water for compression. You are not going to beat years of research and tuning with "use fewer colors".
I remember a YouTube video about "How we did the impossible and got full-motion video for this Sonic game on a system that couldn't do FMVs", and the answer was like, "Well, we used a low resolution, and then we reduced the color palette, and then we cut the frame rate, and then we did interlacing." None of that's impossible! That's like saying you built the Pyramid at Giza using only a bucket of Lego bricks! It's not the same pyramid! Anyone can use a lower resolution! It takes effort and teamwork to come up with a codec that actually compresses data without artifacts!
> Yeah, if you're using lossless compression like PNG or GIF, adding a lossy step to reduce the number of colors in the palette can help.
Depending on the image context it can also backfire, though not so much for photos, but rather screenshots. E.g. sometimes a 2 color dithered image results in a much bigger PNG than, say 16 colors without dithering, because bigger areas of uniform color compress much more efficiently. So I usually just try "everything", to find some sweet spot between file size and quality.
Is there a tool that allows you to select which area of the image to use what dithering parameters and color count for, with a live preview? I know I'll vibecode one myself just to see what it looks like, but maybe this already exists in a "real" application? Then you could e.g. use dithering on the faces, but for the background just a few colors without dithering.
.. What do you mean by "beats" here? Is the article trying to hide the fact that they're doing dithering for, among other things, artistic reasons?
A dithered image almost certainly beats a non-dithered JPEG compressed image in terms of file size, because you can JPEG compress the dithered image. Thus, if you like the look of a dithered image, you get file size reduction as a bonus.
I swear, some people on HN intentionally misinterpret and misrepresent the text of an article just to argue against it in bad faith with these smarmy "um actually" type arguments. For some reason I do not understand, Hacker News tends to surface these comments near the top of its comment sections.
> It's fine to dither images but please please admit that you're doing it for the aesthetic
They did in the article.
> My goal was to immitate a printed image.