5

For dvipng, the -D option increases the dpi of the image but also increases the image size, and the -Q option improves antialiasing but doesn't do enough. Is there a way to increase the image resolution and quality without increasing image size?

Heinrich Schmetterling
  • 6,614
  • 11
  • 40
  • 56
  • 1
    No. If you increase the number of pixels in the image, you are going to increase the file size. You can try some type of compression, but that will start to degrade the quality of your image. – Mica Jan 22 '10 at 16:35
  • 1
    By "size" do you mean file size or pixel dimensions? – ezod Jan 28 '10 at 17:49

3 Answers3

2

I would suggest that you use -D and -Q, and then post-process the generated image using imagemagick's mogrify or something similar to scale the image back. The external program will probably do a better job at doing good scaling.

Alok Singhal
  • 93,253
  • 21
  • 125
  • 158
2

Part of this may have to do with the way DVI files are rendered. You may have better luck using PDF instead of DVI, which is what I did when I needed PNGs from LaTeX sources.

Dietrich Epp
  • 205,541
  • 37
  • 345
  • 415
1

If the -Q option has any effect at all, this means that you are using bitmapped fonts, PK fonts. This is the oldest font format available to TeX, and will not have real good performance.

I suggest you install FreeType, and rebuild dvipng. FreeType has proper antialiasing with proper hinting.

What system are you using?