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 : Thursday, August 3, 2006 4:14:59 PM(UTC)

calem  
calem

Groups: Registered
Posts: 4


Good morning, I see and modify the Leadtools OCR COM Demo example (Version 14) and i use the SCAN option. When the image finish to scan, appears in the window (control LEADRasterView1)and then i try to put the rotate code to rotate this image but it doesn't work, please i hope you can help me how can i rotate the image IN THIS EXAMPLE, thank very much.

The code i put in this sample: Leadtools OCR COM Demo(OCR)
---------------------------------------------------------------------------------------------
RasterProc.Rotate LEADRasterView1.Raster, 9000, ROTATE_RESIZE, RGB(0, 0, 255)

This code doesn't work in this sample, are there another code to rotate the image in this example Leadtools OCR COM Demo?

Thank you Sir.

 

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 : Friday, August 4, 2006 11:22:23 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 766


There are no other ways to rotate a Raster object in COM.  The code you are using looks correct, assuming that you are declaring RasterProc to a LEADRasterProcess object properly, but that should give you compile errors if not. 

Are you getting any errors or does the image just not seem to do anything?  Perhaps you are not refreshing the viewer or changing AutoSetRects to TRUE.  These are the only other lines that are in the VB example in your Main COM helpfile.  I have pasted them below:

LEADRasterView1.AutoSetRects = True 'Make sure the display rectangles are adjusted
LEADRasterView1.ForceRepaint

Let me know if this solves your problem.  If not, please explain it further in more detail.
 
#3 Posted : Monday, August 7, 2006 1:29:46 PM(UTC)

calem  
calem

Groups: Registered
Posts: 4


Good afternoon Sir, the problem maybe is that this example use the ImagePic Control and inside of this control is the LeadRasterView control, because the rotate code works well but it doesn't visualize in the window when i rotate the image, it works internally, how can i visualize the image when is rotating?

I hope you can see this OCR Demo (Version 14)

Thank you very much.

 
#4 Posted : Tuesday, August 8, 2006 9:44:47 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 766


I'm not sure what demo you are talking about.  I have looked at the VB OCR demo and do not see an ImagePic control.  Is this the name of a control or is this an actual type of control?  Let me know exactly what demo you are using.  If it is using a different control than the RasterImageViewer, there may be something else that needs to be done to get it to repaint the screen, but I cannot answer that without knowing what LEAD demo you are using.  Try looking through the code that loads a file and see what it is doing to load a bitmap and repaint it, this may help you find out how to get the rotated image to repaint on the screen if you are sure that it is rotating properly.

If this does not help, feel free to post a sample project that creates and isolates this problem so that I can take a look at it.  Keep in mind that files posted to the forum must be put into a .zip file.
 
#5 Posted : Tuesday, August 8, 2006 12:29:52 PM(UTC)

calem  
calem

Groups: Registered
Posts: 4


In the Main Form i put the rotation code in the (Procedure sub DrawDocPage) after the window paint the image from the scan option but it doesn't work when i want to viualize the rotation of the image in the window. It works internally.

I hope Sir you help me again and thanks for your time to help us to do the things better.

I send you the zip file.

File Attachment(s):
OCR Sample.zip (72kb) downloaded 31 time(s).
 
#6 Posted : Wednesday, August 9, 2006 10:33:15 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 766


This is not the right place to put the code.  You should just make a new menu item and place your code there.  If you place a MsgBox before your rotate code, you'll probably never see it pop up, that was the first thing I did.  Once I moved your code into a new procedure that is called when a specific menu item is called and it worked perfectly.
 
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-2020, Yet Another Forum.NET
This page was generated in 0.212 seconds.