[Image-SIG] How to "crop" along a mask?

Roger André randre at gmail.com
Mon Jan 25 18:55:57 CET 2010

I would think that you could take the Alpha band from the source image and
apply it to the target.  Not sure how exactly this would be done with PIL,
but you might try copying the source image's "transparency" setting over to
the target.


On Sun, Jan 24, 2010 at 2:56 PM, Alec Bennett <wrybread at gmail.com> wrote:

> I'm trying to take a group of pictures and give them rounded edges. I have
> a source image (a rectangle with rounded edges, transparent PNG) and I'd
> like to use this as a template. All the target images would become
> transparent wherever this source image is transparent.
> In other words, I'd be making the same region of the target image
> transparent as is transparent in the source image.
> Any tips for accomplishing this?
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20100125/c948b3d5/attachment-0001.htm>

More information about the Image-SIG mailing list