Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Re: How to use Screen.TwipsPerPixelX?
Started by Sohailsoh at 06-24-2008 9:00. Topic has 9 replies.

Print Search « Previous Thread Next Thread »
  06-24-2008, 9:00
Sohailsoh is not online. Last active: 7/7/2008 9:26:07 AM Sohailsoh

Top 75 Posts
Joined on 06-04-2008
Posts 29
Need Help To Load, Rotate, Resize, Scale(Applying Scaling Factor) Image
Reply Quote

Dear All,

I am new to Lead Tools v 14.5 and i am in need of your help to have solved my problmes.

1) What is the exact controls to show/load the image?

2) how can i draw two circles on the loaded image?

3)  how to apply the scaling factor like 1.6 pixels = 1mm to fit it to 305(width)*405(height) scale

Please help in this regard asap.

A bundle of thanks to all of you.

Regards

 


   Report 
  06-25-2008, 7:25
Yasir Alani is not online. Last active: 9/2/2008 12:40:05 PM Yasir Alani



Top 25 Posts
Joined on 02-05-2007
Posts 204
Re: Need Help To Load, Rotate, Resize, Scale(Applying Scaling Factor) Image
Reply Quote
1. What programming interface are you using? From other posts, it appears you are using our LEAD Raster COM objects inside Visual Studio .NET. Is this correct? If yes, the main display control is the LEADRasterView ActiveX control, which is documented in the Main COM Objects help file. Which programming language are you using? Is it C# or VB.NET?

2. You already asked about this on another post. Please continue within that thread.

3. Do you want to resize the image itself (change the pixel data), or zoom on screen, or print it to physical printer? Please provide more details about this question.


Yasir Alani
LEADTOOLS Technical Support
   Report 
  06-25-2008, 8:50
Sohailsoh is not online. Last active: 7/7/2008 9:26:07 AM Sohailsoh

Top 75 Posts
Joined on 06-04-2008
Posts 29
Re: Need Help To Load, Rotate, Resize, Scale(Applying Scaling Factor) Image
Reply Quote
Thank you for your reply

1) YES - LEAD Raster COM objects inside Visual Studio .NET with VB.NET.

2) Ok I will.

3) I have got the sample to resize and zoom the image.

3.a

But the main problem is that i want to load the image in LEADRasterView control and want to display two circles on it 160 pixels from the top and then want to move the image keeping these circles at their positions on LEADRasterView control.
Actually the image is a human face and i need to adjust the eyes behind these circles .
once eyes will be on circles i wll trim the rest of the image.

Please guide me to place two circles and then to move the image

Regards
   Report 
  06-26-2008, 8:49
Yasir Alani is not online. Last active: 9/2/2008 12:40:05 PM Yasir Alani



Top 25 Posts
Joined on 02-05-2007
Posts 204
Re: Need Help To Load, Rotate, Resize, Scale(Applying Scaling Factor) Image
Reply Quote
About scaling on screen, you can set the LEADRasterView.PaintZoomFactor property to the percentage zoom you want (smaller or larger than 100%).

About drawing the circles, please continue in the other thread you opened for that.


Yasir Alani
LEADTOOLS Technical Support
   Report 
  06-26-2008, 9:12
Sohailsoh is not online. Last active: 7/7/2008 9:26:07 AM Sohailsoh

Top 75 Posts
Joined on 06-04-2008
Posts 29
Re: Need Help To Load, Rotate, Resize, Scale(Applying Scaling Factor) Image
Reply Quote

Thank you.

Actually i want to have the image scaled to 1mm=1.6 pixels.

 

Please advise on this.

 

Regards

 


   Report 
  06-29-2008, 5:04
Yasir Alani is not online. Last active: 9/2/2008 12:40:05 PM Yasir Alani



Top 25 Posts
Joined on 02-05-2007
Posts 204
Re: Need Help To Load, Rotate, Resize, Scale(Applying Scaling Factor) Image
Reply Quote
What do you mean by "1mm" exactly? Is the measurement based on the screen's DPI resolution as determined by the TwipsPerPixelX and TwipsPerPixelY values? If not, please define the exact meaning of a millimeter in your case.
Yasir Alani
LEADTOOLS Technical Support
   Report 
  07-01-2008, 9:01
Sohailsoh is not online. Last active: 7/7/2008 9:26:07 AM Sohailsoh

Top 75 Posts
Joined on 06-04-2008
Posts 29
Re: Need Help To Load, Rotate, Resize, Scale(Applying Scaling Factor) Image
Reply Quote
i have no idea how these works TwipsPerPixelY,TwipsPerPixelx.

1mm is the distance between two eyes and on image because image may have different sizes and resolution we need to sacle it to 1.6 pixels = 1 mm.

Thanks
   Report 
  07-01-2008, 10:54
Yasir Alani is not online. Last active: 9/2/2008 12:40:05 PM Yasir Alani



Top 25 Posts
Joined on 02-05-2007
Posts 204
Re: Need Help To Load, Rotate, Resize, Scale(Applying Scaling Factor) Image
Reply Quote
The Twips Per Pixel values are documented in Windows and Visual Basic help files. They are a measure of the resolution of screens.

About your explanation, I'm afraid I still don't know what you're trying to do. In general, the 2 most common ways an image is scaled are:
1. The image's pixel data is modified to make the resulting image smaller or larger. In LEADTOOLS, we call this "resizing".
2. The image's pixel data is not changed, but when painting it on screen, it gets stretched in or out to make it smaller or larger. We call this "Zooming".

Are you trying to do one of these 2 approaches? Do you have a sample image that you can send me and explain how exactly you define the "1 mm" distance on that image?
Yasir Alani
LEADTOOLS Technical Support
   Report 
  07-03-2008, 6:54
Sohailsoh is not online. Last active: 7/7/2008 9:26:07 AM Sohailsoh

Top 75 Posts
Joined on 06-04-2008
Posts 29
How to use Screen.TwipsPerPixelX?
Reply Quote
Helo All,

I am using 14.5 version with VB.NET 2005.

Please let me know

1) What is Screen.TwipsPerPixelX
2) What is the use of TwipsPerPixelX
3) How can i access it , under which class/namespace/ddl it is. When i try to get it from Screen.TwipsPerPixelX it doesnot show up in Screen.?


Please help


Thank you


   Report 
  07-03-2008, 10:56
Yasir Alani is not online. Last active: 9/2/2008 12:40:05 PM Yasir Alani



Top 25 Posts
Joined on 02-05-2007
Posts 204
Re: How to use Screen.TwipsPerPixelX?
Reply Quote
If you don't know what the TwipsPerPixel properties are, you probably don't need them. I only mentioned them to ask you if this is what you want. Obviously it is not.

I'm afraid that I am still not closer in understanding what you want. Try to image yourself explaining the behavior to somebody who knows nothing about your program (like a non-programmer), what sentences would you use to define the resizing operation that you want done?


Yasir Alani
LEADTOOLS Technical Support
   Report 
Post
LEAD Support Fo... » General » Example Request... » Re: How to use Screen.TwipsPerPixelX?

Powered by Community Server, by Telligent Systems