With PIL... paste image on top of other with dropshadow

Peter Bengtsson peterbe at gmail.com
Fri Feb 23 10:09:07 EST 2007


I love the dropshadow effect I managed to make with this recipe:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/474116

Here's what it can look like:
http://www.peterbe.com/test/188-tequilacat.2.jpg

It takes a background as a parameter but it's just a colour. What I
want is to put the image on top of another but doing so with a
dropshadow. I guess the solution would be something like putting the
dropshadow on the first image without a background colour but instead
a transparant background and then paste this onto another image.

I just have no idea to do that?

The final result I want is something like programmtically fake that a
picture (the foreground) is hanging on a wall (the background) with a
dropshadow so that it looks like it's hanging in a inch-deep frame.




More information about the Python-list mailing list