ordered dither checks and remapping possible?
ordered dither checks and remapping possible?
Hi,
I've been playing with dithering and remapping. I have images I want to reduce to a selected 16 colours from a colourmap of 512. I've got all that working nicely. However I'd like to use -ordered-dither checks rather than Riemersma or FloydSteinberg. Is this possible?
Best wishes,
Matt
I've been playing with dithering and remapping. I have images I want to reduce to a selected 16 colours from a colourmap of 512. I've got all that working nicely. However I'd like to use -ordered-dither checks rather than Riemersma or FloydSteinberg. Is this possible?
Best wishes,
Matt
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: ordered dither checks and remapping possible?
Riemersma and FloydSteinberg are error-diffusion methods. "-ordered-dither" is a dither with no error diffusion. So I don't understand the question.
snibgo's IM pages: im.snibgo.com
Re: ordered dither checks and remapping possible?
Okay I'm trying to remap an image to a colourmap of 512 then order dither it using checks to 16 colours?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: ordered dither checks and remapping possible?
Sorry, I still don't understand. "-ordered-dither" makes each pixel either "on" or "off", so it can only make 8 colours, which are: black, white, red, green, blue, cyan, magenta and cyan.
It can't make 16 colours, or colours of your choosing. See http://www.imagemagick.org/Usage/quanti ... red-dither
Can you show an example of what you want?
It can't make 16 colours, or colours of your choosing. See http://www.imagemagick.org/Usage/quanti ... red-dither
Can you show an example of what you want?
snibgo's IM pages: im.snibgo.com
Re: ordered dither checks and remapping possible?
I literally want to reduce my images to 16 colours but use a dither pattern that's consistent
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: ordered dither checks and remapping possible?
Consistent in what sense?
If you want to reduce an image to 16 colours that you choose, then "-remap" will do that. But each pixel is assigned the closest of the 16 colours, either with error-diffusion dithering, or no with dithering. IM has no simple method for ordered-dithering with 16 chosen colours.
If you want to reduce an image to 16 colours that you choose, then "-remap" will do that. But each pixel is assigned the closest of the 16 colours, either with error-diffusion dithering, or no with dithering. IM has no simple method for ordered-dithering with 16 chosen colours.
snibgo's IM pages: im.snibgo.com
Re: ordered dither checks and remapping possible?
When I say consistent the dither pattern needs to be consistent obviously error-diffusion is too random
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ordered dither checks and remapping possible?
I suspect he means the same unique pattern over the whole image, i.e. an ordered-dither
Re: ordered dither checks and remapping possible?
Yes! Sorry. I'm really new to image processing!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ordered dither checks and remapping possible?
Perhaps this is what you want. See https://imagemagick.org/Usage/quantize/#ordered-dither
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ordered dither checks and remapping possible?
Also see the section https://imagemagick.org/Usage/quantize/#od_posterize for comparison of different methods.
Re: ordered dither checks and remapping possible?
Order-dither is definitely what I'm after but I can't fathom how to restrict it to 16 colours? It looks like you can only restrict to RGB steps?
-ordered-dither checks,8,8,8 is what I have at present but I then have to run a quantize to reduce the colouring but that can't be right surely!
-ordered-dither checks,8,8,8 is what I have at present but I then have to run a quantize to reduce the colouring but that can't be right surely!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ordered dither checks and remapping possible?
I am not a dithering expert. But you could reduce the colors to 16 using +dither -colors 16, then do you ordered dither
The +dither before -colors turns off dithering for reducing colors.
Alternately, you could create a 16 color colormap image
convert xc:color1 xc:color2 .... xc:color16 +append colormap.gif
and then do
Code: Select all
convert inputimage +dither -colors 16 -ordered-dither checks,8,8,8 outputimage
Alternately, you could create a 16 color colormap image
convert xc:color1 xc:color2 .... xc:color16 +append colormap.gif
and then do
Code: Select all
convert inputimage +dither -remap colormap.gif -ordered-dither checks,8,8,8 outputimage
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ordered dither checks and remapping possible?
Please always provide your IM version and platform/OS, since syntax may vary.
Re: ordered dither checks and remapping possible?
Thanks I'll post back in the morning