Welcome to LEAD Support Forum Login | Register | Faq  

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

highLighting
Started by priyanka at 09-15-2008 3:13. Topic has 16 replies.

Print Search « Previous Thread Next Thread »
  09-15-2008, 3:13
priyanka is not online. Last active: 12/18/2008 12:48:12 PM priyanka

Top 50 Posts
Joined on 08-11-2008
Posts 35
highLighting
Reply Quote

hi

How can i use highlighting in webimageviewer.


   Report 
  09-15-2008, 7:34
Qasem Lubani is not online. Last active: 12/21/2008 9:12:09 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,187
Re: highLighting
Reply Quote
What do you mean exactly? Do you want to draw the highlight annotation object?


Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  09-15-2008, 9:36
priyanka is not online. Last active: 12/18/2008 12:48:12 PM priyanka

Top 50 Posts
Joined on 08-11-2008
Posts 35
Re: highLighting
Reply Quote

No i have created a web application in vb.net having webimageviewer that is displaying images from database,now  i want to provide search functionanlity to search particular text in the image and to highlight the searched text wherever it appears in the image pages,i have created window application in which annotation container is used for highlightihng but in one of your forum i saw that annotation cannot be used in web application.even i have tried to recognize word and highlight tha but it is not working

Thanks


   Report 
  09-16-2008, 6:48
Qasem Lubani is not online. Last active: 12/21/2008 9:12:09 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,187
Re: highLighting
Reply Quote
Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}

You can do this at the server side like this:

1. If you have the image and have the locations you want to highlight, take the image and draw highlighted rectangles on it in those locations.

2. To do that, you will need to load the image at the server side into a LEADTOOLS RasterImage object, then draw on the image and save back to a local folder on the server.

3. After saving it, re-load it into the WebImageViewer from the local server folder using OpenImageUrl.

4. To draw on the image while it's loaded, use the .NET Graphics functions with our GdiPlusGraphicsContainer method.
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  09-16-2008, 7:07
priyanka is not online. Last active: 12/18/2008 12:48:12 PM priyanka

Top 50 Posts
Joined on 08-11-2008
Posts 35
Re: highLighting
Reply Quote

Hi

Can i provide option for recognizing text of image at run time.There is any fiuncionality for recognizing text in web application as it is this example............and displaying images in webimageviewer.

http://support.leadtools.com/SupportPortal/cs/forums/2788/ShowPost.aspx#2788

 

I have waiting for long for reply.

thanks



   Report 
  09-16-2008, 8:14
Qasem Lubani is not online. Last active: 12/21/2008 9:12:09 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,187
Re: highLighting
Reply Quote

Did you try the steps I told you about? Did you face any problems?
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  09-16-2008, 9:43
priyanka is not online. Last active: 12/18/2008 12:48:12 PM priyanka

Top 50 Posts
Joined on 08-11-2008
Posts 35
Re: highLighting
Reply Quote

HI  HAVE HIGHLIGHTHING AN IMAGE WITH MY WINDOW APPLICAITON AND SAVE  INTO WEBSERVER FOLDER BUT ON SAVING THE HIGHLIGHTED PART  ARE NOT THERE AND ON OPENING IT IS NOT SHOWING HIGHLIGHTED IMAGE IN WEB IMAGE VIEWER.

EVEN I HAVE HIGHLIGHTED THE IMAGE FROM ANNOTATION EXAMPLE OF LEADTOOL AND SAVE INTO MY VB.NET web application myimage folder AFTER SAVING AND OPENING THE IMAGE THE HIGHLIGHTED PORTION IS NOT APPEARING.


   Report 
  09-17-2008, 7:30
priyanka is not online. Last active: 12/18/2008 12:48:12 PM priyanka

Top 50 Posts
Joined on 08-11-2008
Posts 35
Re: highLighting
Reply Quote

hi tried everything but it si not working i am sending a function i have created for storing the image in vb.net window application after highlighthing and as you said after saving try to open it in your webimageviewer

Public Sub DispayImage()

Dim temp As String = "D:\MyWork\popo.txt"

If Not temp = "" Then

System.IO.File.Delete(temp)

End If

RasterCodecs.Startup()

Dim FileName As String = "D:\MyImage.jpg "

RasterImageViewer1.Refresh()

Dim images As New RasterImage(RasterImageViewer1.Image)

codecs = New RasterCodecs

codecs.Save(images, FileName, RasterImageFormat.Tif, 24, 1, -1, 1, CodecsSavePageMode.Insert)

Dim viewer As RasterImageViewer = New RasterImageViewer()

viewer.Image = codecs.Load(FileName)

annContainerObj = New AnnContainer

annContainerObj.Bounds = New AnnRectangle(0, 0, viewer.ImageSize.Width, viewer.ImageSize.Height, AnnUnit.Pixel)

annContainerObj.Name = "Container"

annContainerObj.Visible = True

annContainerObj.UnitConverter = New AnnUnitConverter(96, 96)

documentEngine.AddPage(viewer.Image, 0)

documentEngine.RecognitionDataFileName = temp

ocumentEngine.EnableSubsystem = True

documentEngine.EnableCorrection = True

documentEngine.Recognize(0, 1, Nothing)

Dim recogWords As IList = documentEngine.GetRecognizedWords(0)

Dim i As Integer

Dim count As Integer

count = 0

' Get word to locate

Dim word_to_find As String

If word_to_find = "" Then

word_to_find = Searchtxt.Text.ToLower.Trim()

End If

' Loop through all of the recognized words, get the coordinates

' and place an annotation there

Dim str As String

For i = 0 To recogWords.Count - 1

str = recogWords(i).Word

If str.ToLower.Contains(word_to_find) Then

count = count + 1

End If

Next

If count = 0 Then

MessageBox.Show(word_to_find & " was not found")

Else

'MessageBox.Show(word_to_find & " was found " & count.ToString & " times")

Dim highlights(count) As AnnHiliteObject

For i = 0 To count

highlights(i) = New AnnHiliteObject

Next

count = 0

For i = 0 To recogWords.Count - 1

If recogWords(i).Word = word_to_find Then

highlights(count).Bounds = New AnnRectangle(recogWords(i).WordArea.Left, recogWords(i).WordArea.Top, recogWords(i).WordArea.Width, recogWords(i).WordArea.Height, AnnUnit.Pixel)

highlights(count).HiliteColor = Color.Yellow

annContainerObj.Objects.Add(highlights(count))

viewer.Refresh()

count = count + 1

End If

Next

End If

viewer.Refresh()

Dim objSaver As New ImageFileSaver

objSaver.Save(Me, codecs, viewer.Image)

'automation.Container.Objects.Add(manager.AnnContainer)

but the images is not showing the highlighted word after saving ,,,,,,,,,,,as you said to create window application for that.......


   Report 
  09-17-2008, 7:30
Qasem Lubani is not online. Last active: 12/21/2008 9:12:09 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,187
Re: highLighting
Reply Quote
How exactly are you highlighting in the Windows application? Are you using annotations or Graphics drawing? If you are using annotations, you can realize or 'burn' the annotations on the image, but that will only work if the image is color. With 1-bit black and white images, trying to realize an object will convert it to pure black or white.
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  09-17-2008, 7:35
priyanka is not online. Last active: 12/18/2008 12:48:12 PM priyanka

Top 50 Posts
Joined on 08-11-2008
Posts 35
Re: highLighting
Reply Quote

Please see my last forum where i have mentioned the code for highlighthing.

thanks

But please try to help me  in webapplication


   Report 
  09-17-2008, 7:46
priyanka is not online. Last active: 12/18/2008 12:48:12 PM priyanka

Top 50 Posts
Joined on 08-11-2008
Posts 35
Re: highLighting
Reply Quote
ha i can save window highlighted image,no need to worry about it just trying next step told by you.
   Report 
  09-18-2008, 8:40
Qasem Lubani is not online. Last active: 12/21/2008 9:12:09 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,187
Re: highLighting
Reply Quote

To save the objects after drawing them, you must either save them using AnnCodecs.Save Method or you must burn them on the image using AnnAutomation.Realize Method. Your code does not appear to be using either of them.
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  10-03-2008, 2:21
priyanka is not online. Last active: 12/18/2008 12:48:12 PM priyanka

Top 50 Posts
Joined on 08-11-2008
Posts 35
Re: highLighting
Reply Quote

Hello

 Thanks For Helping me .I am Using LeadTool Version 15 and created application for highlighthing as susggeste by you.I am attaching a code that i am using  in my webapplication,please go through and suggest me ,this code is  working  in my application but when i have to publish and used this code on web server whether it is possible to run it or not,i am not sure. .so please check wether my code is worng or i am using wrong method of using raster image viewer.


   Report 
  10-03-2008, 2:26
priyanka is not online. Last active: 12/18/2008 12:48:12 PM priyanka

Top 50 Posts
Joined on 08-11-2008
Posts 35
Re: highLighting

Attachment: ImageViewer.zip
Reply Quote
This is the code
   Report 
  10-05-2008, 7:07
Qasem Lubani is not online. Last active: 12/21/2008 9:12:09 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,187
Re: highLighting
Reply Quote
Do you mean this code works when you use it on the same PC where LEADTOOLS is installed, but when you try it on a different computer it fails? If yes, please explain what errors exactly you get.
If not, please describe the problem in more details.


Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
Post
 Page 1 of 2 (17 items) 1 2 »
LEAD Support Fo... » General » Feature Request... » highLighting

Powered by Community Server, by Telligent Systems