Graphics library

Chris Gonnerman chris.gonnerman at newcenturycomputers.net
Mon Sep 30 00:59:21 CEST 2002


----- Original Message ----- 
From: "David Siroky" <dsiroky at email.cz>

> Hi!
> 
> I'd like to know, which library for creating images (like 
> libgd) is "the best". I want to use it with Python.

This is a sore point with me.  I am the current maintainer
of the Python gdmodule:

    http://newcenturycomputers.net/projects/gdmodule.html

I took it over because I needed to annotate graphic images
using TrueType fonts.  The PIL (PythonWare Imaging Library)
is probably superior otherwise, but the font support stinks.

There are two other projects, claimed to be PIL-compatible,
one supporting FreeType (TrueType) and the other supporting
Postscript Type 1; but when I asked here previously for 
examples and/or support using either of them I got resounding
silence.

PIL can be found at:
    http://www.pythonware.com/products/pil/index.htm

The Image-SIG's t1python module is at:
    http://www.python.org/sigs/image-sig/t1lib/
(Incidentally this may have been updated since I first
looked at it, so my complaints here may no longer apply.)

Robert Kern's PyFT can be found at:
    http://starship.python.net/crew/kernr/Projects.html

PIL Plus from Pythonware includes TrueType support (I've read) 
but as a commercial product it was not an option for my 
project.

I looked for the gdmodule, and discovered Richard Jones 
wasn't supporting it anymore.  When I asked about taking it
over, he answered "Sure, go ahead."

So I did.  With help from others I have updated it to support
the 2.01 (beta) libgd.  There are weaknesses, in particular
the terrible JPEG output (rule 1: always use PNG with the
gdmodule), but at least all my TTF fonts work.

gdmodule also has a very simple interface; I don't have to 
know as much about an image file to work with it.  This 
may be related to the crummy JPEG output...  I dunno.

I'd love to see sample code to render either type of fonts
via PIL and one or more of the above libraries.  In fact, 
it seems like an ideal thing for a HOWTO or some such.

Chris Gonnerman -- chris.gonnerman at newcenturycomputers.net
http://newcenturycomputers.net






More information about the Python-list mailing list