I have simple SVG images with very few colors, and want to convert them to PNGs with the same number of colors. Every attempt that I make will either interpolate (and make new colors), or badly distort the colors. Here's some things I've tried:
Code: Select all
url=http://upload.wikimedia.org/wikipedia/commons/9/9d/FedEx_Express.svg
convert $url fedex00.png
convert -colors 3 $url fedex01.png
convert -colors 3 -resize 50% $url fedex02.png
convert -colors 3 -resize 200% $url fedex03.png
convert -resize 200% -colors 3 $url fedex04.png
convert -colors 3 -resize 200% -colors 3 $url fedex05.png
for i in fedex*.png; do identify -format %k $i; echo " $i";done
Code: Select all
34 fedex00.png
3 fedex01.png
381 fedex02.png
2259 fedex03.png
3 fedex04.png
3 fedex05.png