[Image-SIG] drawing antialised text
W.T. Bridgman
William.T.Bridgman.1 at gsfc.nasa.gov
Thu Jul 22 16:02:22 CEST 2004
If you define the image as RGBA with (0,0,0,255) and then call
draw.text with fill=(255,255,255,0) for white text with no
transparency, you can do simple compositing.
Is that what you're looking for?
I'm having antialiasing problems as well with this setup.
Tom
On Jul 9, 2004, at 5:15 PM, Björn Platzen wrote:
> Hello List,
>
> I'm trying to draw some antialiased Text on an 8-bit PNG with
> alphatransparency. But my text always looks horrible. It looks kind of
> distorted.
>
> As a workaround, I initialized a new RGB Image, pasted my PNG and wrote
> my text. After that, I converted the new image to mode "P". Everything
> worked fine and my text looked ok.
>
> But now, I need the produced image with a transparent background. Is
> there any way to write the text directly into my PNG so that it is
> nicely rendered and antialiased?
> Another approach would be to make the background of the RGB image
> transparent. But I don't have any idea how to get this working...
>
>
> I'm workin with PIL 1.15a3 on a Linux-Machine. The server has only PIL
> 1.14, so solutions should work under 1.14 as well...
>
> Thanks in advance,
>
> Bjoern.
>
>
> _______________________________________________
> Image-SIG maillist - Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig
>
>
--
***********************************************************************
**** NOTE NEW EMAIL ADDRESS AS THE WYETH ADDRESS WILL GO AWAY SOON ****
***********************************************************************
Dr. William T."Tom" Bridgman Scientific Visualization
Studio
Global Science & Technology, Inc. NASA/Goddard Space Flight
Center
Email: William.T.Bridgman.1 at gsfc.nasa.gov Code 935
Phone: 301-286-1346 Greenbelt, MD 20771
FAX: TBD http://svs.gsfc.nasa.gov/
More information about the Image-SIG
mailing list