Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cesar
  Where is Cesar?
 
 Brazil
 Cesar
 To: Mike Gagnon
  Where is Mike Gagnon?
 Pointe Claire
 Canada
 Mike Gagnon
 Tags
Subject: RE: how to read text from bmp thorugh gdi+
Thread ID: 249001 Message ID: 249056 # Views: 6 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Win32API programming
Date: Monday, December 28, 2009 1:33:54 AM         
   


> > How can i read the text written on bmp/jpg through gdi+ or any other way?
> > Anil
> > My Blog
>
> You can use Microsoft Office Document Imaging - preferably Office 2003(which is an OCR type application). Here is an example of how to read a TIF file:
>
>
Local miDoc,miLayout,lcStr
> lcStr=''
> CREATE CURSOR mondocument (mondococr m)
> miDoc = Createobject('MODI.Document')
> miDoc.Create( "C:\untitled.tif")
> miDoc.Images(0).OCR
> miLayout = miDoc.Images(0).Layout
> strLayoutInfo ="Language: " + Transform(miLayout.Language )+Chr(13)+Chr(10)
> strLayoutInfo=strLayoutInfo+"Number of characters: " + Transform(miLayout.NumChars)+Chr(13)+Chr(10)
> strLayoutInfo=strLayoutInfo+"Number of fonts: "+ Transform(miLayout.NumFonts )+Chr(13)+Chr(10)
> strLayoutInfo=strLayoutInfo+"Number of words: " + Transform(miLayout.NumWords)+Chr(13)+Chr(10)+Chr(13)+Chr(10)
> strLayoutinfo = strLayoutinfo+miLayout.text
> INSERT INTO mondocument (mondococr) VALUES (strLayoutinfo)
> MODIFY MEMO mondocument.mondococr

>
> Mike Gagnon
> Refox XI +(English version)

Very nice sample Mike !

Thanks for sharing.

Salutations
Cesar
My Blog

ENTIRE THREAD

how to read text from bmp thorugh gdi+ Posted by Anil Sharma @ 12/26/2009 2:08:36 PM
RE: how to read text from bmp thorugh gdi+ Posted by M. Akram Bhatti @ 12/26/2009 2:43:14 PM
RE: how to read text from bmp thorugh gdi+ Posted by Bernard Bout @ 12/26/2009 6:27:17 PM
RE: how to read text from bmp thorugh gdi+ Posted by M. Akram Bhatti @ 12/27/2009 4:05:16 AM
RE: how to read text from bmp thorugh gdi+ Posted by Anil Sharma @ 12/27/2009 6:09:11 AM
RE: how to read text from bmp thorugh gdi+ Posted by Mike Gagnon @ 12/27/2009 12:50:55 PM
RE: how to read text from bmp thorugh gdi+ Posted by Cesar @ 12/28/2009 1:33:54 AM
RE: how to read text from bmp thorugh gdi+ Posted by Cesar @ 12/28/2009 1:37:27 AM