[Image-SIG] Bad antialias? (in Python Imaging Library 1.1.5)
Laszlo Zsolt Nagy
gandalf at designaproduct.biz
Tue Sep 20 10:27:14 CEST 2005
kevin at cazabon.com wrote:
>I've managed to do fairly decent anti-aliased text from bitmap PIL fonts,
>even including colored text, as follows:
Have you seen my example PNG?
My problem is not with bitmap fonts. BTW I tried to do what you said
before I wrote to this list. Create a B&W image from the text and use it
as an alpha channel while interpolating between the text color image and
the original image. fonts. Then I realized that I have problems with
overlaying one image onto another in general. The problem comes when
'original' is a transparent image. Paste will only handle one mask
(textMask), but it doesn't care about the alpha channel of your original
image. E.g. if your original image had this colour: (255,0,0,0) and
your text color is (0,0,255,255) then the result will have lilac pixels
(127,0,127,255) around the text, instead of (0,0,255,127).
I created a short but detailed example with some source images, a python
program and the explanation of the error.
More information about the Image-SIG