Advanced blitting or bitmap mapping
-
I have a rectangular bitmap I want to transform into an arbitrary four-sided convex polygon. Is there any simple way of doing this knowing the vertices of the polygon? DirectX or OpenGL are not options. The entire bitmap should be fitted within the polygon with the original corners at the polygon vertices. Hopefully someone knows a way which doesn't require me to do all the skew/rotation/translation calculations myself :) Thanks in advance
-
I have a rectangular bitmap I want to transform into an arbitrary four-sided convex polygon. Is there any simple way of doing this knowing the vertices of the polygon? DirectX or OpenGL are not options. The entire bitmap should be fitted within the polygon with the original corners at the polygon vertices. Hopefully someone knows a way which doesn't require me to do all the skew/rotation/translation calculations myself :) Thanks in advance
Niklas Lindquist wrote:
I want to transform into an arbitrary four-sided convex polygon.
It is a quadrilateral, isn't it?
Niklas Lindquist wrote:
Hopefully someone knows a way which doesn't require me to do all the skew/rotation/translation calculations myself
Oh, noone here, I suppose, would deny you such a amusing task... :rolleyes: :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Niklas Lindquist wrote:
I want to transform into an arbitrary four-sided convex polygon.
It is a quadrilateral, isn't it?
Niklas Lindquist wrote:
Hopefully someone knows a way which doesn't require me to do all the skew/rotation/translation calculations myself
Oh, noone here, I suppose, would deny you such a amusing task... :rolleyes: :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Niklas Lindquist wrote:
I want to transform into an arbitrary four-sided convex polygon.
It is a quadrilateral, isn't it?
Niklas Lindquist wrote:
Hopefully someone knows a way which doesn't require me to do all the skew/rotation/translation calculations myself
Oh, noone here, I suppose, would deny you such a amusing task... :rolleyes: :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
I have a rectangular bitmap I want to transform into an arbitrary four-sided convex polygon. Is there any simple way of doing this knowing the vertices of the polygon? DirectX or OpenGL are not options. The entire bitmap should be fitted within the polygon with the original corners at the polygon vertices. Hopefully someone knows a way which doesn't require me to do all the skew/rotation/translation calculations myself :) Thanks in advance
My favourite Bitmap articles at CP: Add fast user-extensible image processing support to CBitmap[^] CBitmapEx - Free C++ Bitmap Manipulation Class[^] I hope it can help. :zzz:
Press F1 for help or google it. Greetings from Germany
-
I have a rectangular bitmap I want to transform into an arbitrary four-sided convex polygon. Is there any simple way of doing this knowing the vertices of the polygon? DirectX or OpenGL are not options. The entire bitmap should be fitted within the polygon with the original corners at the polygon vertices. Hopefully someone knows a way which doesn't require me to do all the skew/rotation/translation calculations myself :) Thanks in advance
i know it's bad form to plug your own products, but this will do it[^]. though it's not free (not really expensive, either). the DLL download package contains an app called ISDemo.exe, which does quad->quad warps.