I have a php program that takes latex code on the fly and produces gif images of math equations. The three commands that get executed in the php code are:
Code: Select all
/usr/texbin/latex --interaction=nonstopmode myfile.tex
/usr/texbin/dvips -E myfile.dvi -o myfile.ps
/usr/local/bin/convert -density 120 -crop 0x0 -transparent "#FFFFFF" myfile.ps myfile.gif
I now need to put my program on a Mac Server. I installed the packages ImageMagick and MacTex. Unfortunately, the gif files are poorer quality and look more pixelated. Example:
I took the ps file from the Mac Server and ran the same convert command on my linux server; the resulting gif file looks just fine. I also tried compiling sample Tex code inside the TeXShop GUI on the Mac, and the resulting PDF looks perfectly good. All this made me conclude that the problem occurs during the convert execution.
I tried adding -antialias, but that didn't help. (I had never used it on the linux servers, anyway.) My code is based on the library LatexRender: http://www.mayer.dial.pipex.com/tex.htm
My hope is to be able to execute "convert" with the proper options, so that the result are excellent quality gif's of math equations. Can anyone suggest a pointer or two? I would really appreciate your help.
Thank you,
Gabe.