News for hackers. Stuff that matters.
Re:Dithering – Part 1 by snvzz on Wednesday October 29, 2025 @08:34PM (#45755005)
The gimp can do this.

Define your palette, then via the dialog spawned through image->format menu, pick your palette from the list.

Re:Dithering – Part 1 by glimshe on Wednesday October 29, 2025 @10:31PM (#45755790)
Yes, but the algorithm isn't that great... That's what I'm using now
Re:Dithering – Part 1 by snvzz on Thursday October 30, 2025 @12:37AM (#45756480)
"Positional" is a single, relatively boring hardcoded pattern, and the other options are Floyd–Steinberg error diffusion.

I do agree it would be nice to extend gimp to do all sorts of fancy dithering, and imagine it's just that nobody has put on the work yet.

Re:Dithering – Part 1 by kragen on Thursday October 30, 2025 @12:53AM (#45756563)
Floyd–Steinberg is pretty great when your palette has reasonably-close colors.
Re:Dithering – Part 1 by snvzz on Thursday October 30, 2025 @07:20PM (#45766576)
In my own experience playing with dithering, generating a palette is often harder than the dithering itself.
Re:Dithering – Part 1 by kragen on Thursday October 30, 2025 @07:43PM (#45766784)
Heckbert's median-cut algorithm usually does a great job. See https://web.cs.wpi.edu/~matt/courses/cs563/talks/color_quant.... There's probably something improved since then, though.
Re:Dithering – Part 1 by snvzz on Thursday October 30, 2025 @10:44PM (#45767779)
That's cool, and resembles my own approach, which I'll reevaluate and polish now :)
Re:Dithering – Part 1 by kragen on Thursday October 30, 2025 @11:18PM (#45768001)
Delighted to help! I've never implemented it myself.