Reference: PostScript to PNG Conversion

I’ve usually used the ImageMagick program convert to get a bitmap out of PostScript files, but it can be hard to drive and the useful documentation is hidden among hundreds of commandline options to apply weird visual effects. The latex2html program pstoimg seems to do well when given a few key arguments:

pstoimg -antialias -density 300 -type png -out foo.png foo.ps

Here “300” is the DPI at which to generate the image, and the -antialias is important for good results. It looks like a -geometry argument may be important for EPS files if they have bounding boxes that aren’t what you want.

Update: One thing to watch out for is that pstoimg doesn’t handle paths with spaces in them correctly. Just work around that.

Questions or comments? For better or worse this website isn’t interactive, so send me an email or, uh, Toot me.

To get notified of new posts, try subscribing to my lightweight newsletter or my RSS/Atom feed. No thirsty influencering — you get alerts about what I’m writing; I get warm fuzzies from knowing that someone’s reading!

Later: CiteULike

Earlier: Study Break

See a list of all posts.

View the revision history of this page.