ImageMagick / ImageMagick

🧙‍♂️ ImageMagick 7
https://imagemagick.org
Other
12.26k stars 1.36k forks source link

Feature request: Add support for arbitrary-palette positional dithering #3705

Closed Fernap closed 1 year ago

Fernap commented 3 years ago

Prerequisites

ImageMagick version

7

Operating system

Windows

Operating system, version and so on

-

Description

I'm new here, so I hope this is a reasonable way to request a feature. I think it would be nice to add the support for positional (ordered) dithering with an arbitrary palette (either picked by ImageMagick, or user-supplied).

Some rather old IM doc about color quantization (here, all the way at the very bottom) even talks about this very possibility, but laments the lack of a suitable algorithm to use. However, Joel Yliluoma has given a fairly detailed description of just such an algorithm in a writeup here that seems like it would be appropriate.

This should help to produce nicer-looking animations than error-diffusing methods, and would be suitable for small palettes. Unfortunately, this is all a bit beyond my skill level, so I'm hoping someone else might be able to implement it.

Steps to Reproduce

-

Images

No response

urban-warrior commented 3 years ago

The ImageMagick development will likely not implement the arbitrary-palette positional dithering algorithm. However, we would accept a pull request from a user that wants to contribute the algorithm.