[magick-users] Antialiased PDF rasterization

Ross Presser rpresser at gmail.com
Wed Mar 11 17:06:29 UTC 2009


Andy Goth <unununium at aircanopy.net> wrote:

> "duc sequere aut de via decede" <duc.sequere.aut.de.via.decede at imagemagick.org> wrote:
>> > If this is due to a memory size limit
>> 
>> Ghostscript has memory limits which you can adjust with the MaxBitmap
>> parameter.
> 
> Thanks for the tip.  I'll try running gs directly, then processing its results with ImageMagick.

Indeed. A good Ghostscript command to start with would be:

gs -dNOPAUSE -dBATCH -sDEVICE=png16m -r150 \
   -dTextAlphaBits=4 -dGraphicsAlphaBits=4 \
   -sOutputFile=output.png input.pdf

This will use PNG as the output format (24-bit color), which will be 
compressed greatly over PNM; and it will use Ghostscript's built-in 
antialiasing procedures.

I view the built-in pass through from ImageMagick to Ghostscript for 
PS/EPS/PDF as a convenience to be avoided.  Rasterizing directly with 
Ghostscript is almost always a better idea.


More information about the Magick-users mailing list