Page 1 of 1

Reduce color depth and dither?

Posted: 2013-02-02T16:59:49-07:00
by NimaiMalle
I tried all of the following, but the resulting image has color bands - no dithering.

Code: Select all

convert Sample.png -depth 4 Sample2.png 
convert Sample.png -depth 4 -dither FloydSteinberg Sample2.png 
convert Sample.png -depth 4 +dither Sample2.png 
Image => Image

Any suggestions appreciated!

Re: Reduce color depth and dither?

Posted: 2013-02-02T17:40:53-07:00
by snibgo
convert Sample.png -colors 16 Sample2.png

Re: Reduce color depth and dither?

Posted: 2013-02-02T23:19:10-07:00
by NimaiMalle
snibgo wrote:convert Sample.png -colors 16 Sample2.png
Thanks for the reply. A 16 color pallet is different than a color depth of 4, 16-bit RGBA.
Still looking for way to get that to dither...

Re: Reduce color depth and dither?

Posted: 2013-02-03T02:50:54-07:00
by snibgo
Ah, sorry. "-remap" can dither, and can use the colours from your Sample2:

Code: Select all

convert Sample.png -depth 4 Sample2.png 
convert Sample.png -remap Sample2.png Sample3.png
Is Sample3.png what you want?

Re: Reduce color depth and dither?

Posted: 2013-02-03T19:07:04-07:00
by NimaiMalle
Fascinating. There are some peculiar artifacts but it did indeed dither.
Image

Re: Reduce color depth and dither?

Posted: 2013-02-03T23:06:21-07:00
by anthony