[Image-SIG] PIL Bug report and performance problem

Fredrik Lundh fredrik@pythonware.com
Sun, 7 Feb 1999 12:34:02 +0100


Barry Scott wrote:
> bdf2pil.py does not work. Python reports:

bdf2pil.py is obsolete (shouldn't have been in the
distribution). Use pilfont.py instead.

> Performance problem in Image font

I just did some radical changes on this front in the
current codebase. First, there's a new internal "fill
with mask" primitive, which is used by several
functions:

-- the "paste" method can now take a colour value as
the source (well, it has supported this for a while, but
it then created a temporary image -- pretty slow, in
other words. The new version is really fast).

-- there's a new "bitmap" operation in the ImageDraw
interface that draws an "1" image in the current colour.
Also supports "antialiased" bitmaps; an "L" image is inter-
preted as an alpha layer (doesn't work for all target
modes, though).

-- and "text" uses this function, of course.

I've also moved some of the font functionality (getsize,
getmask) into C code for better speed.

This also means that there will probably be a very short
second beta (maybe labelled "release candidate 1" just
to make sure any build or platform dependent problems
are fixed before the final release).

Cheers /F
http://www.pythonware.com/people/fredrik