Live data from Hacker News

How My Images Are Dithered

dead.garden

21–30 of 81 posts

Re: How My Images Are Dithered

#21

Every image should be dithered below 10 bits/component to prevent banding artifacts.

Yeah this is important when you print images, since printers can reveal banding artifacts you can’t see on a monitor. I learned this the expensive way printing a batch of large format images that had gradients in them, without dithering. This is also how I learned one way that Photoshop was for professionals and GIMP & ImageMagick weren’t; At the time (and this was years ago, to be fair), Photoshop dithered by default when going from 16 to 8 bits, while those popular open source tools did not and also did not even have good ways to do it manually by adding the right amount of noise before changing the bit depth. I don’t know what the open source tools do today, maybe they’ve fixed it, I haven’t checked.

Re: How My Images Are Dithered

#22
> 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!

Re: How My Images Are Dithered

#23

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…

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!

Re: How My Images Are Dithered

#24

> 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…

> 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.

Re: How My Images Are Dithered

#25
post #13
post #10

Title here is missing "How" as in "How My Images Are Dithered"

That’s a hn filter to avoid clickbait titles I think

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.

Re: How My Images Are Dithered

#26
post #21

Every image should be dithered below 10 bits/component to prevent banding artifacts.

Yeah this is important when you print images, since printers can reveal banding artifacts you can’t see on a monitor. I learned this the expensive way printing a batch of large format images that had gradients in them, without dithering. This is also how I learned one way that Photoshop was for professionals and GIMP & ImageMagick weren’t; At the time (and this was years ago, to be fair), Photoshop dithered by defaul…

Yeah. But even if you stay in the digital realm, dithering is necessary at 8bits per component. Consider that a grayscale gradient can only have 256 distinct levels.

Re: How My Images Are Dithered

#27
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.

Re: How My Images Are Dithered

#29
post #21

Earlier quoted context omitted.

Yeah this is important when you print images, since printers can reveal banding artifacts you can’t see on a monitor. I learned this the expensive way printing a batch of large format images that had gradients in them, without dithering. This is also how I learned one way that Photoshop was for professionals and GIMP & ImageMagick weren’t; At the time (and this was years ago, to be fair), Photoshop dithered by defaul…

Yeah. But even if you stay in the digital realm, dithering is necessary at 8bits per component. Consider that a grayscale gradient can only have 256 distinct levels.

True! You’re less likely to be surprised by banding on a display, because you can see it before it’s a problem, and it’s less likely to cost money, but for sure the need for dithering is still there, especially for displays that can do more than 8 bits per channel or can do high dynamic range.

> Consider that a grayscale gradient can only have 256 distinct levels.

This is true, but also keep in mind that for print and low dynamic range displays we humans only need approximately 256 levels, as long as the levels are perceptually spaced out evenly. 8 gamma corrected bits per channel actually made sense for a long time, for both print and for TVs & monitors, until HDR displays came along, relatively recently. Needing dithering for 8 bit images displayed on a 10 bit display is perhaps less surprising than needing dithering even when your display and your printer are both only 8 bits, right?

Post reply on HN