Live data from Hacker News

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

surma.dev

51–60 of 203 posts

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

#51

What about dithering for the smallest possible images? I'm talking in the 300 byte - 2kb range here. Does anyone have any suggestions for what to do to really get file size down?

Quantizing to I’m currently exploring this for my own applications, compressing large 8bit sprite sheet images, and it’s producing much smaller images than most palette based image formats (GIF, WebP, PNG, etc). Follow my progress here: https://twitter.com/mattdesl/status/1346048282494177280?s=21

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

#52
Interesting, I "dither" (shift the telescope around between photos) my astrophotos to go from noise to less noise - funny seeing it go from image to noise. Does anyone have any papers on dithering + image integration to go in this direction? always been interested in knowing more about it.

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

#53

As for arbitrary-palette positional dithering, there's no better write up than https://bisqwit.iki.fi/story/howto/dither/jy/

Bisqwit's discussion of dithering is outstanding. He presents a very impressive algorithm for arbitrary-palette dithering that is animation safe.

> This paper introduces a patent-free positional (ordered) dithering algorithm that is applicable for arbitrary palettes. Such dithering algorithm can be used to change truecolor animations into paletted ones, while maximally avoiding unintended jitter arising from dithering.

He demonstrates it "live coding" style in this[1] video where he writes a demo in 256 colors of a "starfield" animation with color blending and Gaussian blur style bloom. The first animation at 6:33 using traditional ordered dithering has the usual annoying artifacts. The animation at 13:00 using an optimal palette and his "gamma-aware Knoll-Yliluom positional dithering" changed my understanding of what was possible with a 256 color palette. The animation even looks decent[2] dithered all the way down to a 16 color palette!

If that wasn't crazy enough, he also "live codes" a raytracer[3] in DOS that "renders in 16-color VGA palette at 640x480 resolution."

[1] https://www.youtube.com/watch?v=VL0oGct1S4Q

[2] https://www.youtube.com/watch?v=W3-kACj3uQA

[3] https://www.youtube.com/watch?v=N8elxpSu9pw

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

#54

What an odd coincidence… I just acquired an "Inkplate" for my birthday (a recycled Kindle screen glued onto a board with an Arduino and wifi) and was in the process of looking for old 1bit art for it, stumbled across the term "ditherpunk" just last night. - https://inkplate.io artists: - https://unomoralez.com - https://www.instagram.com/mattisdovier/?hl=en - https://wiki.xxiivv.com/site/dinaisth.html I'm going to st…

I started extracting images from old Hypercard stacks, and then found this page which has done all of this work!

https://mariteaux.somnolescent.net/junk/hypercard/

Raid away :)

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

#55

What about dithering for the smallest possible images? I'm talking in the 300 byte - 2kb range here. Does anyone have any suggestions for what to do to really get file size down?

I did use dithering for unimportant background images of a website. Use just 256 colors, and both PNG and GIF will use a color palette instead of describing each pixel separately. Really helps with the file size. Afterwards muck with the various lossless compression parameters in PNG with optipng to shave off a few more percent.

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

#57

Another way to think of dither (that may only make sense to people with a signals background) is that it linearizes the error introduced by the quantization step (which is a non-linear process). This has a bunch of conceptual implications (like elimination of error harmonics being natural consequence) but maybe most importantly allows you to continue using linear analysis tools and techniques in systems with a quanti…

This thesis on noise shaping and dither http://uwspace.uwaterloo.ca/bitstream/10012/3867/1/thesis.pd... is an excellent mathematical treatment of the subject.

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

#59

The article mentions Bill Atkinson’s dithering algorithm, invented during his work on the original Macintosh. You can also read more about it here: https://www.evilmadscientist.com/2012/dithering/ It’s actually implemented in BitCam iOS app by icon factory: https://iconfactory.com/bc.html And Emilio Vanni did a neat e-paper display experiment with it here: https://www.emiliovanni.com/atkinson-dithering-machine

Also, drop an image here:

http://gazs.github.io/canvas-atkinson-dither/

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

#60
post #9

Earlier quoted context omitted.

discussed by the author of the mentioned game (return of the obra dinn) here: https://forums.tigsource.com/index.php?topic=40832.msg136374...

I originally found out about Obra Dinn by reading that devlog—it's totally fascinating, and shows impressive attention to detail. > It feels a little weird to put 100 hours into something that won't be noticed by its absence. Exactly no one will think, "man this dithering is stable as shit. total magic going on here." Luckily, thanks to this post, we have the privilege of thinking that.

He's not entirely correct, either. I haven't played it, but I did see video of it, and I was impressed by the stability of the dithering. It takes work to avoid it looking like https://www.youtube.com/watch?v=2AKtp3XHn38 or something.
Post reply on HN