Live data from Hacker News

Dithering with CSS

ikesau.co

11–20 of 30 posts

Re: Dithering with CSS

#11
post #9

Is this actually dithering? I have dabbled with some dithering algorithms and while this is way faster than my naive js implementations, this looks pretty bad

Yes it is dithering. Unusual dithering though - I don't see why it is coloured. Is this intended for printers?

The image gets de-saturated but the noise that's mixed in is colored. This looks like a mistake.

I think the noise is also way too 'soft'. At high frequencies it just becomes near-uniform gray so it barely affects the thresholding.

Re: Dithering with CSS

#13
If we could get jbig2 native support in browsers we could do monochrome black and white images at ridiculously small file sizes.

A page of sheet music can be as small as 8kb. I'm using a wasm decoder right now, but I could forsee using css filters after the fact to make it look less sharp and aliased

Re: Dithering with CSS

#15
I'd love to see a live preview of the final file size that updates as you change the parameters, maybe debounced by 100ms or so. Although as others mentioned, is this actually proper dithering, seems like the effect of dithering without actually doing it?

Re: Dithering with CSS

#17

Earlier quoted context omitted.

I recommend lookscanned.io if you need a similar effect for legal reasons

please add atleast one example to demonstrate how the output will look like.

There is no sign-up or anything, so you can see how it looks immediately by opening the web app. https://lookscanned.io/scan

Re: Dithering with CSS

#19
It is so wild that this got shared, as I was working on a project that very specifically was hoping to integrate a feature like this. Psyched to try it, I’ll credit the author in the credits of the site I’m building.

Re: Dithering with CSS

#20
post #11
post #9

Earlier quoted context omitted.

Yes it is dithering. Unusual dithering though - I don't see why it is coloured. Is this intended for printers?

The image gets de-saturated but the noise that's mixed in is colored. This looks like a mistake. I think the noise is also way too 'soft'. At high frequencies it just becomes near-uniform gray so it barely affects the thresholding.

Yeah they could add grayscale to the filter rule to make the colors go away.

  #dither-demo img.dithered {
    filter: url(#dither) grayscale(1);
  }
Post reply on HN