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

Laura & Edward Cannon cannon.el at gmail.com
Mon Jan 25 20:15:35 CET 2010


Using imagechops, multipy the alpha channels. If your source image in
white everywhere you could just multiply the images. Alternately you
could add the mask from the one image to the other image using the
addalpha method which takes a L or 1 band image as the alpha chanel)

On Mon, Jan 25, 2010 at 11:15 AM, Laura & Edward Cannon
<cannon.el at gmail.com> wrote:
> Using imagechops, multipy the alpha channels. If your source image in
> white everywhere you could just multiply the images. Alternately you
> could add the mask from the one image to the other image using the
> addalpha method which takes a L or 1 band image as the alpha chanel)
>
> 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
>>
>>
>


More information about the Image-SIG mailing list