[Image-SIG] Bad antialias? (in Python Imaging Library 1.1.5)
Laszlo Zsolt Nagy
gandalf at designaproduct.biz
Mon Sep 19 11:48:10 CEST 2005
>Apparently, antialiasing will use a mixture of the background color and
>the text color on the edges.
>I think this is good only if the background is fully opaque. Is there a
>workaround?
>
>
I can already give the correct transformation (I checked this with a
very slow putpixel/getpixel iteration):
function overlay(image1,image2) -> image
For each pixel
INPUT:
image1 = R1,G1,B1,A1
image2 = R2,G2,B2,A2
OUTPUT:
(R1*A1 + R2*A2)/A1+A2,(G1*A1 + G2*A2)/A1+A2,(B1*A1 + B2*A2)/A1+A2,A1+A2
But I cannot do this in PIL. Is it possible at all? This would be a very
good extension, and it would solve the text antialiasing problem too.
Les
More information about the Image-SIG
mailing list