pavanpvss@gmail.com has asked for the wisdom of the Perl Monks concerning the following question:

Hi, Can anyone tell me a module which can convert text in paint brush to .doc ?

Replies are listed 'Best First'.
Re: Convert text in paint to doc files
by Anonymous Monk on Aug 31, 2011 at 14:05 UTC
    its called OCR, simply install tesseract program and use system to call it
    system qw[ tesseract.exe foo.png foo.txt ]; my $text = read_file('foo.txt');
    You may need to preprocess the images to help Tesseract, say using ImageMagick like:
    system qw[ convert.exe -resize 200% image.jpg foo.png ];
Re: Convert text in paint to doc files
by CountZero (Bishop) on Aug 31, 2011 at 15:47 UTC
    Or use the module Image::OCR::Tesseract.

    It will take care to convert your file to a .tiff file which is expected by Tesseract.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James