[Image-SIG] Image Transform with Perspective

sean.berry at cox.net sean.berry at cox.net
Wed Aug 9 18:37:09 CEST 2006


Okay, so here is the situation.  I have need to do some on-the-fly image 
creation.  I have everything working great except for the last part of it, 
applying a perspective type transform to the image.  The transform will take 
a rectangular 2D image and transform it to a 3D representation in 2D.

Please see the link to see what I am trying to do:
http://seanberry.com/transform.png

I have PIL v1.15 installed which has a PERSPECTIVE transform, but it does 
not appear to do what I want - or I can't figure out how to use it correctly 
because it is using a transform matrix's coefficients.

Here is the only info I could find on the usage:
http://mail.python.org/pipermail/image-sig/2005-February/003198.html

This is for the creation of images to be used in Flash.  Originally I was 
doing the image processing in Flash because Flash 8 has a BitmapData class which does the basics of images, copy, transform, etc.  To accomplish the transform I was using an algorithm that approximated triangles to fill and 
worked really well, but I need the image processing to be server side, not 
client.

So, here I am.  Anyone have any idea how to accomplish my goal here?  Is 
there a way to fill a triangle with a bitmap using PIL so I could use the Flash alogithm?  What about better docs on the PERSPECTIVE transform or an example of how to accomplish my desired transform?

Thanks for any and all help on this.


More information about the Image-SIG mailing list