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 : Wednesday, June 20, 2007 10:02:41 PM(UTC)

M000761  
M000761

Groups: Registered
Posts: 14


Hi,

Using leadtools 14.5 for .NET. The following code allows me to capture the contents of a drawn rectangle on a given TIF image.

Me.Viewer.InteractiveMode = RasterViewerInteractiveMode.Region
Me.Viewer.InteractiveRegionType = RasterViewerInteractiveRegionType.Rectangle

However, if I rotate the image using either deskew or any other method (e.g. 90, 180 or 270 degrees) I am no longer able to draw a rectangle over the document. Is there a simple workaround for this???

Also... the deskew command often behaves very strangely. Cropping and shrinking documents... is this suppose to do this... and is there a workaround for this too?

Thanks

Adam
 

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, June 21, 2007 8:20:48 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


My first suggestion would be to change the interactive mode off, make changes to the image, and then turn it back on by doing something like this:

Me.Viewer.InteractiveMode = RasterViewerInteractiveMode.None
...rotating code...
Me.Viewer.InteractiveMode = RasterViewerInteractiveMode.Region
Me.Viewer.InteractiveRegionType = RasterViewerInteractiveRegionType.Rectangle

As for the Deskew function, it can behave "erratically" but it is based on he input data.  The deskew functions works by recognizing long lines of horizontal text.  If an image does NOT have a lot of text on it, or if the text is inconsistently spaced, it can cause the image to rotate worse than it was before.  Images can also affect the performance of the deskew function.  If your image has images as well as text in it, then make sure you use the flag
DSKW_DOCUMENTANDPICTURE.

Finally, if you think that the Deskew function is performing improperly, please get the latest patch and see if the results change for you.  Please send an email to support@leadtools.com in order to get the download instructions for the latest v14.5 patch.  For verification purposes, be sure to include the following information:
 
1. The company you work for
2. The LEADTOOLS serial number you own (if you are evaluating, just say so and we'll send you the eval patch)
3. The name(s) of the developer(s) using the serial number
4. A link to this forum post
 
#3 Posted : Thursday, June 21, 2007 4:41:48 PM(UTC)

M000761  
M000761

Groups: Registered
Posts: 14


I tried what you said re the rotation of images but it still doesn't work. Do I have to save the image first? and then re-activate in the interactive mode?

Please confirm if you've tried something similar and iif it has worked for you when rotating a tif image.

Thank you.
 
#4 Posted : Sunday, June 24, 2007 8:43:52 PM(UTC)

M000761  
M000761

Groups: Registered
Posts: 14


?
 
#5 Posted : Monday, June 25, 2007 4:04:57 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


I added a viewer, loaded an image into it, set the interactivemode to Region like you did and then rotated the image.  After rotation I had no problems continuing to draw rectangular regions, attached is my project.  If the same code doesn't work with your DLLs, then you will probably need to get the latest patch.  In that case, please send an email to support@leadtools.com in order to get the download instructions for the latest v14.5 patch.  For verification purposes, be sure to include the following information:
 
1. The company you work for
2. The LEADTOOLS serial number you own (if you are evaluating, just say so and we'll send you the eval patch)
3. The name(s) of the developer(s) using the serial number
4. A link to this forum post

If this is not how you are reproducing the problem, then please put together a small sample project (NOT your entire application) that isolates the problem so I can try to reproduce it here.

NOTE: If you are attaching a project or file to the forums...
1.) Zip the file(s) up.
2.) Make sure it is less than 10 MB.  If it is larger, please send an email to support@leadtools.com or  give us your email address and we'll send you FTP instructions.
3.) Remove ANY AND ALL unlock codes and LEADTOOLS DLLs.
4.) Do not click the preview button, the attachment will not show up when you post it.
 
If you do not wish to post your file(s) on the forum since they are publically viewable, please send an email to support@leadtools.com and make sure that you include a link to this forum post.

File Attachment(s):
 
#6 Posted : Monday, June 25, 2007 3:42:06 PM(UTC)

M000761  
M000761

Groups: Registered
Posts: 14


Thanks for your response Greg.

The problem I had was that I was using the Image.RotateViewPerspective(intDegrees) command rather than the RotateCommand as u were using in your code. This fixed the problem.

Thanks again.
 
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.126 seconds.