I'm trying to convert a png32 file down to 256 colours/png8, preserve transparency/alpha, and dither BUT I keep on getting some weird artifacts OR a black background.
The closest I could get to having 256 colours and dithering is example #7 - by separating the alpha channel and by using -ordered-dither on it beforehand. It looks kinda wonky @_@.
I'm relatively new to ImageMagick. So, I apologize if I'm doing something obviously stupid or if what I'm trying to do is just not possible...
I'm running...
WAMP 2.2
PHP 5.3
Win 7x64
ImageMagick 6.8.0 Q16
Here's some various sample code with img output results...
1.Original File
2.
Code: Select all
exec('convert old.png -alpha off -dither FloydSteinberg -alpha on -colors 255 new.png');
3.
Code: Select all
exec('convert old.png -alpha off -dither FloydSteinberg -colors 255 -alpha on new.png');
4.
Code: Select all
exec('convert old.png -colors 255 -dither FloydSteinberg new.png');
5.
Code: Select all
exec('convert old.png -dither FloydSteinberg -colors 255 new.png');
6.
Code: Select all
exec('convert old.png -quantize transparent -dither floydSteinberg -colors 255 new.png');
7.
Code: Select all
exec('convert old.png ( -channel A -ordered-dither 8x8 ) -dither FloydSteinberg -colors 255 new.png');
8.hi-res - similiar to #2, #5