Top
Best
New

Posted by surprisetalk 3 days ago

My Images Are Dithered(dead.garden)
139 points | 56 comments
trentor 2 hours ago|
I was a rotogravure printer in another life, and this post made me a bit nostalgic. In intaglio printing you usually don't see these patterns because the electrostatic assist pulls the ink out of the cells, and the colors blend together more. It's more akin to a developed photo. I mainly remember them from having to do offset printing for the intermediate exam during my apprenticeship.

Our paper was about 3.5 meters wide, and a single roll length was 2–3 kilometers which ran for 20-30 minutes. The process delivered high quality at high speed, so we printed titles like Playboy and the IKEA catalogue in every language (for a language change we only had to swap the black cylinders, since the data was optimized so the text was mostly single color black). A print run of the IKEA catalogue, around 40 million copies, took about two months. It was brain numbing but also really zen. I miss it sometimes.

ReactiveJelly 2 hours ago||
> 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!

galleywest200 2 hours ago||
> 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.

customguy 51 minutes ago|||
> 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.

mort96 1 hour ago||
.. 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.

CharlesW 1 hour ago||
> 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.

That's backwards. Dithering (and simulated halftoning, as in this case) adds detail/noise, making images harder to compress efficiently.

rahimnathwani 3 hours ago||
If you're doing halftoning with the intent to get custom DTF (direct to film) prints for t shirts, you might find this tool helpful:

https://tools.encona.com/dtf

It aims to 'knock out' some areas of the image: make them transparent in the digital image so those areas are not part of the final film. This means less of the surface of the t shirt has film on it, allowing it to be breathable and flexible.

I got some DTF prints made before I knew you were meant to do this. The tutorials online required a lot of steps so I made the above for next time. Not tested for real yet.

rgoodwintx 2 hours ago|
Bravo! One of my canary projects for LLMs has been a spot color / dithering tool; very much an amateur screen printer, and it seemed a way to spark my own interest to do some multicolor prints. Suffice to say the models couldn’t handle it, but I haven’t checked in a generation or two, so this is great motivation to try again!
hnl68yz0go 1 minute ago||
This framing is spot on
olivierestsage 8 minutes ago||
Recommended: https://doodad.dev/dither-me-this/
xnx 3 hours ago||
Title here is missing "How" as in "How My Images Are Dithered"
iTokio 3 hours ago|
That’s a hn filter to avoid clickbait titles I think
petercooper 2 hours ago|||
Which, more often than not, causes weird titles I’m more likely to click due to sounding curious and interesting, undoing the entire point of the feature.

I would not have clicked on “How My Images Are Dithered” but this truncated version made it sound more like an interesting bug story.

gausswho 3 hours ago||||
My Title Was Dithered
jagged-chisel 49 minutes ago||
Lossy compression
Tempest1981 2 hours ago|||
Reminded me of how Safari removes the first word from tab titles
ectoloph 1 hour ago||
Didder[0] is a good tool for dithering. I use it to pre-process images for the 6-color e-ink displays.

You can go down a rabbit hole of dithering algorithms too, like Floyd Steinberg[1]

[0] https://github.com/makew0rld/didder [1] https://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dither...

Retr0id 4 hours ago||
I suppose it is a type of dithering, but really this is Halftoning
Isamu 3 hours ago|
Yes, which of course is still cool. Probably the main point.
AyanamiKaine 1 hour ago||
Ohhhh that is so cool, but I agree with the others its more halftoning. When you want to dither/pixelate an image you can use Image-to-Pixel [0].

[0]https://tezumie.github.io/Image-to-Pixel/

jcynix 1 hour ago|
Hmm, that gives me an idea: dithering (of generally "mogrifying") my images might make them less palatable for those pesky AIs roaming my web server …
More comments...