Live data from Hacker News

Why do we need dithering?

typefully.com

21–30 of 115 posts

Re: Why do we need dithering?

#21
post #10
post #8

Earlier quoted context omitted.

Yeah, the article is wrong about that.

It would be nice if you had some examples.

A very simple black-to-white gradient can only be, at most, 256 pixels wide before it starts banding on the majority of computers that use SDR displays. HDR only gives you a couple extra bits where each bit doubles how wide the gradient can be before it starts running out of unique color values. If the two color endpoints of the gradient are closer together, you get banding sooner. Dithering completely solves gradient banding.

Re: Why do we need dithering?

#22
post #15

This is going to be an odd comment, but I immediately recognised the parrot in the test images. It's the scarlet macaw from 2004 which is often used in many Wikipedia articles about colour graphics. I think this is the original, photographed and contributed by Adrian Pingstone: https://commons.wikimedia.org/wiki/File:Parrot.red.macaw.1.a... But this particular derivative is the one that appears most often in the Wiki…

This also used to be a really common test image: https://en.wikipedia.org/wiki/Lenna

But its apparently a cropped centerfold from Playboy

Re: Why do we need dithering?

#24
post #7

Earlier quoted context omitted.

From the article: > We don't really need dithering anymore because we have high bit-depth colors so its largely just a retro aesthetic now. By the way, dithering in video creates additional problems because you want some kind of stability between successive frames.

The article is simple wrong, dithering is still widely used, and no we do not have enough color depth to avoid it. Go render a blue sky gradient without dithering, you will see obvious bands.

Yep, even high quality 24-bit uncompressed imagery often benefits from dithering, especially if it's synthetically generated and, even if it's natural imagery, if it's processed or manipulated - even mildly - it'll probably benefit from dithering. If it's a digital photograph, it was probably already dithered during the de-bayering process.

Re: Why do we need dithering?

#25
post #22
post #15

This is going to be an odd comment, but I immediately recognised the parrot in the test images. It's the scarlet macaw from 2004 which is often used in many Wikipedia articles about colour graphics. I think this is the original, photographed and contributed by Adrian Pingstone: https://commons.wikimedia.org/wiki/File:Parrot.red.macaw.1.a... But this particular derivative is the one that appears most often in the Wiki…

This also used to be a really common test image: https://en.wikipedia.org/wiki/Lenna But its apparently a cropped centerfold from Playboy

The original Lenna is controversial, but I'm delighted to share the "ethically sourced Lenna": https://mortenhannemose.github.io/lena/

Re: Why do we need dithering?

#26
post #10

Earlier quoted context omitted.

It would be nice if you had some examples.

The average desktop computer is running with 8 bit color depth the vast majority of the time, so find or generate basically any wide basic gradient and you'll see it.

I think you mean 24 bit. 8 bit would only be 256 colors total.

Re: Why do we need dithering?

#27
A related bit of tech trivia is that digital audio also often involves dithering, and not just decimated or compressed audio. Even very high-quality studio mastered audio benefits from an audio specific kind of dithering called noise shaping. Depending on the content, studio mixing engineers may choose different noise shaping algorithms.

https://en.wikipedia.org/wiki/Noise_shaping

Re: Why do we need dithering?

#28

They answered the question in the first two sentences: We don't need it, it's just an aesthetic nowadays.

Dithering isn't only applied to 2D graphics, it can be applied in any type of spatial or temporal data to reduce the noise floor, or tune aliasing distortion noise to other parts of the frequency spectrum. Also common in audio.

Re: Why do we need dithering?

#29

Earlier quoted context omitted.

The average desktop computer is running with 8 bit color depth the vast majority of the time, so find or generate basically any wide basic gradient and you'll see it.

I think you mean 24 bit. 8 bit would only be 256 colors total.

8 bits for each of R G and B. So a grey-scale gradient indeed has only 256 colors available. Any gradient also will have about that many at most.

Re: Why do we need dithering?

#30

Earlier quoted context omitted.

I think you mean 24 bit. 8 bit would only be 256 colors total.

8 bits for each of R G and B. So a grey-scale gradient indeed has only 256 colors available. Any gradient also will have about that many at most .

In most gradients, the transitions in R, G, and B are at different places.
Post reply on HN