2011-02-21

Howto convert AI to PNG, with good antialiasing & transparency

This does all the transparency handling, antialiasing, and resizing all together inside Ghostscript, so they all work together and make a high quality final image.


mv Logo.ai Logo.ai.pdf
gs -dBATCH -dSAFER -dNOPAUSE \
-dDOINTERPOLATE \
-sDEVICE=png16m \
-dGraphicsAlphaBits=4 \
-r72 \
-SOutputFile=Logo.png Logo.ai.pdf
pngcrush -v \
-rem text \
-l 9 \
-brute \
Logo.png Logo.crush.png
mv Logo.crush.png Logo.png


If you want to shrink the image to half size, change the -r72 to -r36, and so forth.

No comments:

Post a Comment