[IMAGE-SIG] Converting GIF to PostScript for printing

Fredrik Lundh fredrik@pythonware.com
Tue, 20 Jan 1998 01:00:55 +0100

>I am attempting to write a Python Script which retrieves reports from an
>HTTP server and prints them out. The reports are accessible on a page by
>page basis in the form of scanned images in GIF format. I have been
>using PIL/Python 1.5 on a PC and was doing fine until I tried to use the
>PSDraw class to convert the GIF to PostScript for printing. It appears
>that GIF images are not supported in the PSDraw class. 
>Is there a way around this problem?

Try converting the image to either RGB (if you have a colour
printer) or L.  For example:

    im = Image.open("my.gif")
    im = im.convert("L") # greyscale
    ...draw using PSDraw...

(PSDraw should probably do that automatically. I'll add it to
the list of things to fix in future versions)

Cheers /F

IMAGE-SIG - SIG on Image Processing with Python

send messages to: image-sig@python.org
administrivia to: image-sig-request@python.org