[reportlab-users] How to save drawings with transparent background as PNG? (Was Re: reportlab-users Digest, Vol 102, Issue 11)
Dinu Gherman
gherman at darwin.in-berlin.de
Mon Aug 27 18:33:58 EDT 2012
Tim Meneely wrote:
> Perhaps I'm completely off-base, but there seems to be a mis-match between your subject line and the text of your email. I don't know how to help with saving drawings with transparent backgrounds (except using a standalone program such as GIMP). [...]
Hi Tim,
I'll reuse my own subject line in order to help readers of email
archives...
Sorry, if my message caused any confusion, but in fact, yes, in my
first one I referred to generating PNG files with a transparent back-
ground from RL drawings (reportlab.graphics.shapes.Drawing).
And in the second I referred to overlaying one transparent PNG image
of the class reportlab.graphics.shapes.Image over another (not ne-
cessarily transparent image of the same class) inside a drawing and
saving this to a PNG file respecting the transparency effect.
Both doesn't work for me for such drawings, but I do get the trans-
parent image overlays with the Canvas class giving me a PDF file,
which is not what I need in this case. I hope this is clearer now.
BTW, it would be very nice to allow reportlab.graphics.shapes.Image
to read a file also from a StringIO object and not only from a real
file object in the filesystem.
Regards,
Dinu
More information about the reportlab-users
mailing list