[Tutor] help-Please help me to read Text From JPEG file

Alan Gauld alan.gauld at blueyonder.co.uk
Thu Sep 2 09:14:27 CEST 2004

> Please help me to write python code to read Text from JPEG file and
store to
> standard TEXT file.

We had this request once before, a long time back, it might be worth
searching the archives on ActiveState to see if there was an answer.

But basically the "text" in a JPEG is just part of the bitmap pattern
encoded using the JPEG compression rules, trying to extract text from
a JPEG will be extremely difficult unless the JPEG is limited to a
scanned image of a printed page, in which case an OCR program could
be used and you might find a library of OCR functions somewhere.

But if the text is in a mixed graphics picture - the name of a hotel
in a photo say, it will be extremely difficult to extract it from
the image. You might fare better if you post to the comp.lang.python
group too - this is a bit advanced for the tutor list I suspect!


Alan G.

More information about the Tutor mailing list