PIL vs eps

Robin Becker robin at jessikat.fsnet.co.uk
Thu Feb 28 00:58:04 CET 2002


.
.....
>I don't know what kind of constraints you're dealing with, but the correct
>way to handle an eps file (i.e. make it display) would be to actually
>embed it in what is essentially a dummy .ps file, e.g. take the eps data
>and surround it with the minimal ps header and footer necessary and then
>process that instead of the original. (The problem you're having is rooted
>in the fact that you're trying to treat an eps file like a ps file, so the
>solution is to use the eps to make a real ps file).

well I didn't actually expect anything, someone else was using PIL to
import images into ReportLab. On the other hand given that the PIL
module concerned is called EPSImagePlugin.py I would somehow have
expected it to cope with eps files. Also inside there is an explicit
class called EpsImageFile which I reckon is supposed to handle them.

Unfortunately I can't seem to get a nox11 ghostscript to build on
freeBSD 4.5 so I am guessing here. Certainly the error is reported to
occur exactly where the .ppm output would be read back.
-- 
Robin Becker



More information about the Python-list mailing list