2

Possible Duplicate:
How to merge a transparant png image with another image using PIL

I have a couple of PNG files:

http://dl.dropbox.com/u/6599273/testing/image1.png
http://dl.dropbox.com/u/6599273/testing/image2.png

As you can see, those images have transparent parts. When you put one on top each other they will form a nice looking image. Here, the composed image:

http://dl.dropbox.com/u/6599273/testing/image_composed.png

I composed the image using paint.net in a really straightforward way (drag&drop). But I need to do it programatically, using Python. And generalized to thousand of images like those (all same dimensions: 256x256 px)

How could I do it? I'm experimenting with PIL. Is it possible?

Many thanks in advance, and best regards

Community
  • 1
  • 1
Jorge Arévalo
  • 2,858
  • 5
  • 36
  • 44

1 Answers1

3

This question was already answered at How to merge a transparant png image with another image using PIL. Use the paste method of PIL images

Community
  • 1
  • 1
Gandaro
  • 3,427
  • 1
  • 17
  • 19