Live data from Hacker News

Ditherpunk: The article I wish I had about monochrome image dithering

surma.dev

141–150 of 203 posts

Re: Ditherpunk: The article I wish I had about monochrome image dithering

#141

Earlier quoted context omitted.

I don't think of colorspaces as "historical burdens". I don't like that CRT monitors are brought up every time sRGB is mentioned though. I know it has historical relevance, but it's not relevant anymore, and it's not needed to understand the difference between linear and non-linear colorspaces.

I misunderstood what you mean. Please ignore. On a side note, by colorspace I mainly meant that we can just stick with one with ultra-wide gamut. There are indeed other reasons to have different color spaces. (Below is my original comment for transparency.) ------------- Gamma isn't really about CRT; or I should say, they're two different things. The fact CRT has a somewhat physical "gamma" (light intensity varies no…

> It absolutely should

The GP just pointed out that the CRT link is not needed to motivate the talk about linear vs non-linear.

Re: Ditherpunk: The article I wish I had about monochrome image dithering

#142
post #81

> However, sRGB is not linear, meaning that (0.5,0.5,0.5) in sRGB is not the color a human sees when you mix 50% of (0,0,0) and (1,1,1). Instead, it’s the color you get when you pump half the power of full white through your Cathod-Ray Tube (CRT). While true, to avoid confusion, it might be better rephrased without bringing human color perception or even colors into the mix. sRGB uses non-linear (gamma) values, which…

Are you sure about sRGB being already good enough for averaging ? (As long as we don't want to go to a wider color space of course.)

We have been recently taught how to do it 'properly', and we had to go through CIELAB 76 (which, AFAIK, is still an approximation, as human perception is actually non-euclidean).

Re: Ditherpunk: The article I wish I had about monochrome image dithering

#143

Earlier quoted context omitted.

I misunderstood what you mean. Please ignore. On a side note, by colorspace I mainly meant that we can just stick with one with ultra-wide gamut. There are indeed other reasons to have different color spaces. (Below is my original comment for transparency.) ------------- Gamma isn't really about CRT; or I should say, they're two different things. The fact CRT has a somewhat physical "gamma" (light intensity varies no…

> It absolutely should The GP just pointed out that the CRT link is not needed to motivate the talk about linear vs non-linear.

You're right, I misunderstood (overlooked the CRT part in OP's article.)

Re: Ditherpunk: The article I wish I had about monochrome image dithering

#144
post #81

> However, sRGB is not linear, meaning that (0.5,0.5,0.5) in sRGB is not the color a human sees when you mix 50% of (0,0,0) and (1,1,1). Instead, it’s the color you get when you pump half the power of full white through your Cathod-Ray Tube (CRT). While true, to avoid confusion, it might be better rephrased without bringing human color perception or even colors into the mix. sRGB uses non-linear (gamma) values, which…

I always feel we have way too many historical burdens (which were good compromises at the time) in (digital) image/video field. In no particular order (and some are overlapping), I can immediately think of gamma, RGB/YCbCr/whatever color models, different (and often limited) color spaces, (low-)color depth and dithering, chroma subsampling, PAL/NTSC, 1001/1000 in fps (think 29.97), interlaced, TV/PC range, different…

That's a bit like saying that we shouldn't use lossy image/video compression.

Do you realize the amount of 'waste' that a 32bpc†, 4:4:4, imaginary color triangle gamut picture would have ?

†it looks like the human eye has a sensitivity of 9 orders of magnitude, with roughly 1% discrimination (so add 2 orders of magnitude). So, looks like you would need at least 37 bits per color with a linear coding, the overwhelming majority of which would be horribly wasted !

Re: Ditherpunk: The article I wish I had about monochrome image dithering

#145

Great article! Frustrated that Firefox doesn't support "image-rendering: pixelated". FF supports "crisp-edges" and happens to implement that as nearest-neighbor filtering but the spec says that is not the meaning of "crisp-edges". I don't understand why Firefox is dragging their feet on this. It seems like such an easy thing to add. In fact given their current implementation they could just make `pixelated` a synonym…

Send a patch!

Re: Ditherpunk: The article I wish I had about monochrome image dithering

#146
post #68

> As this image shows, the dithered gradient gets bright way too quickly. sigh Not in Firefox on Linux. I vaguely recall seeing a multi-year-old bug related to subtly broken gamma behavior in either Firefox or Chrome, but can't seem to find it right now.

Are you sure about that ?

The default Ubuntu photo viewer shows it in the same way.

Also, for his second 'improved' dithering, the dithering clearly doesn't correspond to the undithered gradient (both undithered gradients seem to be the same in both pictures ??)

See also :

https://news.ycombinator.com/item?id=25644176

Re: Ditherpunk: The article I wish I had about monochrome image dithering

#147
post #91

Is it just my eyes or does the gradient dithered in sRGB look more accurate that the one dithered in linear space?

I think both gradients are "wrong" in that they themselves interpolate without correcting for RGB. I think the first example thte original and dither are wrong in the same way, while in the second the dither is more right than the gradient is. Basically I'm afraid the author of this post is a bit of a "careless eager student" archetype who, while generously pointing out the gotchas that to an expert might be second n…

Yes, this is also my impression.

But see also :

https://news.ycombinator.com/item?id=25644176

Re: Ditherpunk: The article I wish I had about monochrome image dithering

#149
> color palettes are mostly a thing of the past

> With HDR and wide gamut on the horizon, things are moving even further away to ever requiring any form of dithering.

My impression is that, if anything, the almost total dominance of sRGB (in the consumer space) is coming at an end in the digital mediums, on one side from the generalization of wide gamut and high dynamic range transmissive LCD/LED screens, and on the other end the rising wave of both (higher frequency) black & white and color e-ink. (And I'm still hopeful for the resurrection of transflective LCDs, like in Pebble.)

So I would expect dithering to come back, either to avoid banding on lower bit per color displays, and/or 'add' colors to lower color gamut ones.

For instance, my 2009 LCD is a 8bpc wide gamut one (and fairly high dynamic range too). So if I were to take full advantage of it (leaving sRGB), I would require dithering to avoid banding.

Post reply on HN