Ordered dithering with a set amount of colors?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Ordered dithering with a set amount of colors?

Post by snibgo »

"-dither" is a setting. It doesn't change images. It only affects operations such as "-colors" and "-remap" that reduce the number of colours. It doesn't affect "-posterize" or "-ordered-dither" operations.

The default dither method is "Riemersma". If you don't want dithering in those operations, "+dither" turns it off.

By contrast, "-ordered-dither" is an operation that changes an image.

So, yes, they are different beasts.
plshelpx_x wrote:And -ordered-dither means -ordered-dither -posterize 2
No.

In my view, the best way to learn IM is to play wth it. Read the documentation, but also write loads of scripts.
snibgo's IM pages: im.snibgo.com
plshelpx_x
Posts: 7
Joined: 2017-02-12T08:57:40-07:00
Authentication code: 1151

Re: Ordered dithering with a set amount of colors?

Post by plshelpx_x »

What I don't understand, is why -ordered-dither can't be a setting like -dither. Is it just that IM doesn't work that way or are there no viable way of implementing an ordered dither "function" that can use palettes of your choosing?

I just want something like -dither Riemersma, but instead of being random scattered dots it's neatly organized, aka "ordered".
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Ordered dithering with a set amount of colors?

Post by fmw42 »

Perhaps you want something like this -- http://www.imagemagick.org/Usage/quanti ... one_offset
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Ordered dithering with a set amount of colors?

Post by snibgo »

plshelpx_x wrote:What I don't understand, is why -ordered-dither can't be a setting like -dither.
"-dither" is merely a setting that applies to some colour-reduction operations. The setting determines how error is to be diffused.

"-ordered-dither" is a colour-reduction operation that does not diffuse errors.
snibgo's IM pages: im.snibgo.com
Post Reply