473,396 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Quad Perspective Transformation

I have a need to tile a bitmap across an arbitrary quadrilateral, and
apply perspective to it.
The Python Imaging Library (PIL) has an undocumented function that
might work, but I can't figure out how to make it work. You're
supposed to pass it 8 parameters, a b c d e f g h .

What I want is to take a rectangular texture map and 'flop it down on
the floor' - pinch in the left and right with perspective, and squash
down the top with perspective. I've modified those 8 parameters and
examined the results, but that hasn't brought me any closer to my
goal.

The PIL function is this:

im2 = im.transform(im.size, Image.PERSPECTIVE, (1, 0, 0, 0, 1, -100,
0, .001), Image.BILINEAR)

Here's hoping someone can shed some light on this function!

Feb 1 '07 #1
1 3052
En Thu, 01 Feb 2007 13:46:37 -0300, Kamilche <kl*******@comcast.net>
escribió:
I have a need to tile a bitmap across an arbitrary quadrilateral, and
apply perspective to it.
The Python Imaging Library (PIL) has an undocumented function that
might work, but I can't figure out how to make it work. You're
supposed to pass it 8 parameters, a b c d e f g h .
I don't know exactly how it's implemented, but the usual perspective
transformation matrix has exactly 8 non zero parameters. Any text on
computer graphics should cover it. My first hit on Google:
http://bishopw.loni.ucla.edu/AIR5/2Dperspective.html

--
Gabriel Genellina

Feb 1 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sergio del Amo | last post by:
Hi, I use the xslt functions provided by php. I am running in my computer the package xampp(www.apachefriends.org) which includes php/apache/mysql .. In this package the php includes the sablotron...
4
by: Kevin Dean | last post by:
I'm trying to create an XSL transformation that will strip out development-specific attributes from deployment descriptors and other XML files. I have already successfully done so with web.xml but...
7
by: CK | last post by:
Hello, I have the 60 MB XML string and I am coding a program in Visual Basic to run a XSL transformation on it. Currently, I'm using the Microsoft standard MSXML 2.0 to create a DOM document, load...
2
by: TomekR | last post by:
Hello ! I was developing xslt sheet lately and - experimenting - I made mistake resulting in that, the effect of the transformation is not well-formed xml document. I made these tests using...
25
by: John Gibson | last post by:
Hi, all. I need to upgrade my dual Xeon PostgreSQL engine. Assuming similar memory and disk sub-systems, I am considering a Quad Xeon system vs. a Dual Itanium for PostgreSQL. I believe that...
2
by: HendrikLeder | last post by:
Hello everybody :-) Next year I`ll write my diploma in computer science for business (It`s a degree in Germany) and I`ve some questions about the topic. The diploma will handle about refactoring...
11
by: sunil | last post by:
Dear All, I have created a .Net service in 2.0 and running it on a machine that has a Quad Processor. It is failing with the following error. "Error 1053: The service did not respond to the start...
12
by: harry | last post by:
Just wondering, if one has Dual or Quad core CPU and one is running multiple different programs, or multiple copies of the same program, does the operating system (XP or 2003) run each individual...
1
by: newbie | last post by:
This is probably a too general question, thanks for any feedback in advance. I am trying to write a class to do transformation on a data set. I want to make it easy to maintain in the long-run...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.