Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, January 9, 2007 9:52:47 AM(UTC)

marasma  
marasma

Groups: Registered
Posts: 51


Hi,

I'm developing the porting of our applications from VB6 to VB.NET and from LT13.5 to LT 14.5, and I'm having problems with perspective command. As you can see in attached images, with the old application I had a self made algorthim that did what a need, but now is not reusable.

With the old application the perspective of the texture was self calculated and it works even if some little mistakes were possible.

Noe I  need to create a texture and apply perspective to it. No problem for create texture, but applying perspective to it I obtain a wrong size bitmap for apply to texture. I do the following step:

1 - I Define an object (for example a polygon area), that is just of the correct size and shape. (image 1)

2 - I define a texture of the needed size starting from a little bitmap (Image 2)

3 - I apply it to the polygon area, and I obtain the 2D texture.

4 - Now If I apply the perspective command I obtain the polygon area with a right perspective, but with the wrong size. (Image 3)

This way is right if I want to apply the perspective to an object, but is not what I need to apply a perspective texture to a predefined surface (the resulted bitmap is little then surface area). I can't see any way in Leadtools Toolkit for do this, but I think that I can use DirectX within Leadtools Toolkit. Right? Any suggestion? I'm a newbie of imaging developing, and very satisfied about Leadtools, but this is a great problem for me.

Can you help me? Thanks!!!

File Attachment(s):
SELEZIONATE.rar (1,120kb) downloaded 30 time(s).
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, January 11, 2007 1:08:40 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)


Does this mean Image 3 is wrong? If yes, what is wrong with it exactly?

 
#3 Posted : Thursday, January 11, 2007 2:06:29 AM(UTC)

marasma  
marasma

Groups: Registered
Posts: 51


Hi,
image 3 is not wrong but made with the old application written in VB6, with a self-made algorithm. I've to obtain the same result but with VB.NET and LT14.5.
I thought that perspective command would have made this for me, but the perspective command is applicable only to object and not to surface with texture. You can try to draw a rectangle filled with texture and than apply perspective. You'll see the rectangle smaller than before. This is right for object's perspective, but in reality a define the bounds of surface like in image 1 and 2 and that ceate a texture with perspective like in image 3 starting from a little bitmap.
Thanks
 
#4 Posted : Sunday, January 14, 2007 12:51:05 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)


One way to do it is by following the below steps:




1-Fill a large image with texture.


2-Apply the "Perspective" command on the image.


3-Cut out area you need from this large image.

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.143 seconds.