[Image-SIG] Font fill color on solaris

Edward Loper edloper@seas.upenn.edu
16 Apr 2002 22:43:19 -0400

It seems that the "fill" parameter on ImageDraw.text has no effect on
PIL 1.1.3 under Solaris 2.5.1.  I traced the problem back as far as
draw_bitmap.  From the experimentation I've done, draw_bitmap on solaris
2.5.1 with pil 1.1.3 seems to ignore the fill/pen color.  I was
unwilling to delve into the C code, so that's as far as I got.

Here's some code that demonstrates the problem:

>>> import Image, ImageDraw, ImageFont
>>> i = Image.new('P', (50,50), color=127)
>>> f = ImageFont.load('helvR08.pil')
>>> d = ImageDraw.ImageDraw(i)
>>> d.text([20,20], 'white', fill=255, font=f)
>>> d.text([20,30], 'black', fill=0, font=f)
>>> i.show()

(You get both texts drawn in black).  I also tried it with a monochrome
image (Image.new('1', ...)) and got the same problem.

Using setink() instead of the fill parameter doesn't make any

Any idea what might be at fault here?  Any ideas for work-arounds?

I was able to produce this bug with the following versions of programs:
  Python 2.1.1 (#6, Aug 28 2001, 15:43:27)
  PIL 1.1.3
  Solaris 2.5.1

The only other system I have to test it on is Linux 2.4.17, where I do
*not* see the same problem.

Any help is appreciated.  Thanks.