[reportlab-users] painting an image over another

Michele Simionato michele.simionato at gmail.com
Wed Feb 9 00:29:47 EST 2005


Last week my PIL installation was screwed up and I couldn't
run test_pdfgen_general.py, so I solved my problem using ImageMagick. 
However I reinstalled PIL from sources and today I have checked it.
FYI, the example on page 7 of the generated PDF does not work on 
my box. The yellow background is NOT transparent. The text says

"""
The optional 'mask' parameter lets you define transparent colors. 
We used a color picker to determine that the yellow in the image 
above is RGB=(225,223,0). We then define a mask spanning these 
RGB values: [254, 255, 222, 223, 0, 1]. The background vanishes!!
"""

However the background does not vanishes and the text below is
obscured. Can you check that? Looking at the source code I found the
line (#672)

    myMask = [254,255,222,223,0,1]

I thought the problem was that the Red value was 225, so I tried to
mask 224,225 instead of 254,255, but nothing changed. I assume it
worked at some moment on your machine and if I could get it working
too it would simplify very much my life (I do not like the dependency
on ImageMagick).

Using:

python 2.3
PIL 1.1.4
reportlab 1.19

on a Mandrake box.

Thanks,


              Michele Simionato


More information about the reportlab-users mailing list