[reportlab-users] 2 pbs : TrueType difficulties and transparency
michele.simionato at gmail.com
Mon Mar 14 13:20:30 EST 2005
On Mon, 14 Mar 2005 18:27:06 +0100, Webmaster <webmaster at expertancy.com> wrote:
> 2/ transparency
> still in the testshapes series, I can't manage to have a gif or png with
> transparent background. I read mail archives about setting a transparent
> entry in the pil_config dictionnary, but it didn't help.
I could not get transparency to work in reportlab 1.19, but it works
fine with 1.20.
This is an example:
white_is_transparent = [254,255, 254,255, 254,255]
canvas.drawImage("backgroundimage.gif", 0, 0, WIDTH, HEIGHT)
canvas.drawImage("foregroundimage.gif", 0, 0, WIDTH, HEIGHT,
(draws the foregroundimage over the background image; the white
color is transparent).
More information about the reportlab-users