How would I do
convert t1.png -quantize YUV +dither -colors 16 -depth 4 t2.png
from a script?
I took a look at PythonMagick which did not include any documentation, but I gathered that the Magick++ documentation is close. So my attempt was following:
from PythonMagick import Image
i = Image('t1.png')
i.quantizeColors(16)
i.quantizeDither(True)
i.quantize()
i.depth(4)
i.write('t2.png')
The above is just guesswork which seems to do something, but result is not the same as the convert even if I remove the colorspace YUV from convert. I didn't see how to I could create a colorspace in PythonMagick, perhaps that is just a missing feature...
Anyway, I'd be happy with an example in PerlMagick, MagickWand or what ever that would do the trick.
Thanks