[reportlab-users] RGBA Colors

Kevin D Smith Kevin.Smith at sixquickrun.com
Thu Dec 3 10:43:35 EST 2009


On Dec 3, 2009, at 9:40 AM, Robin Becker wrote:

>> I'd want to be able to stick bitmap images onto canvases with

>> transparency. e.g. take this PNG which has a transparent

>> border, and display it with alpha=0.5 (meaning the transparent

>> border would remain with alpha=0, but the body of the image

>> would have alpha=0.5 and be translucent).

>> Does this sort of thing fit with either model?

>> Peter

> ........

>

> I'm not convinced the alpha things apply to images, Kevin says they do, but is that from observation or just an assertion. Perhaps images count as something filled or stroked. I haven't tried it out yet.

> --

> Robin Becker


Just coincidentally, I was doing something with images this morning and I had used a color with a 0.5 alpha just before putting in the image. When I did that, the image came out with 0.5 alpha as well. I actually had to set the canvas alpha to 1 in this case to make it look like I wanted it to. So it does work, at least in the case of the drawImage method.

Kevin D Smith
Kevin.Smith at sixquickrun.com





More information about the reportlab-users mailing list