"charlie clark" wrote:
I would like to be able to mark areas on a map with round points. I already have the round points as a separate graphic with a transparent background. When I use Image.paste(im, (10, 10)) the paste works but the background of the pasted image is white rather than transparent. I think that I should be doing something with a mask but I don't quite understand how this works. Thanks for any tips.
to do a transparent paste, you need to pass in the mask (or matte) as the third argument.
if you're pasting RGBA data into an RGB image, you can simply pass in the overlay itself as the third argument:
image.paste(im, (10, 10), im)
if you're using P images, you have to create a mask first. something like this might work:
lut = [1] * 256 lut[im.info["transparency"]] = 0 mask = im.point(lut, "1") image.paste(im, (10, 10), mask)
</F>
_______________________________________________ Image-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/image-sig
