matplotlib/matplotlib — pull request #1959 by leejjoon (2013-04-29 08:12:15+00:00)
Title: PS backend optionally jpeg-compresses the embedded images

This PR is to enable the postscript backend to jpeg-compress the embedded images (other artists like texts are untouched, i.e., they are still in vector format). This can significantly reduce the file size of postscript output (of course the image quality will be degraded), which will be useful for sites like arxiv.org.

```python
plt.savefig("file.eps", compress_images=True)
```

The compression is done when the eps file is created by matplolib (it uses PIL), or when the postscript file is distilled (only "xpdf" distiller is supported, I could not figure out how to do this with "ghostscript distiller").