[reportlab-users] painting an image over another

Robin Becker robin at reportlab.com
Fri Feb 4 04:00:34 EST 2005


Andy Robinson wrote:
>>From reortlab/pdfgen/canvas:
.......
> Look at reportlab/test/test_pdfgen_general.py
> and the output test_pdfgen_general.pdf (which it rather
> cryptically puts under your temp directory, not alongside).  There
> is one example of an image mask there.
> 
> However, I have not used it for overlaying images and
> am not 100% sure it works the way you want; please let us know!
> 
> thanks,
> 
> Andy Robinson

I guess Andy is assuming that you know which bits of your second image 
are to be regarded as transparent by colour. I think if the image has 
transparency (like some gifs) then you can use the string 'auto' for the 
mask. If on the other hand you need to mask off parts geometrically you 
need to set up a clipping path.
-- 
Robin Becker


More information about the reportlab-users mailing list