[metapost] resolution of a metapost graphic

Troy Henderson thenders at gmail.com
Thu May 6 19:39:42 CEST 2010


As Karel said, the EPS is a vector graphic so in a sense it has no
native "resolution" per se.  The graphic has a natural print size, but
can be scaled to any size you want without losing quality.  The
"resolution" that you are seeing is the resolution that you get when
you convert it from vector EPS to a raster format (such as PNG, JPG,
etc.).  ImageMagick works with raster graphics, so in order for it to
process an EPS, it must first rasterize it and thus choose a
resolution to use.

If you do

convert foo.eps foo.png

it uses (by default) 72 pixels per inch to convert the vector EPS to
raster PNG.  If this is not sufficient, you can try something like

convert -density 300 foo.eps foo.png

This will use 300 pixels per inch (as opposed to the default 72) for
the conversion, and your resulting PNG will have a larger geometry, a
larger filesize, and better quality.

Troy Henderson


More information about the metapost mailing list