Skip to content

Commit

Permalink
Merge pull request #322 from mbani01/master
Browse files Browse the repository at this point in the history
Fix typo in library name (pytesseract)
  • Loading branch information
dtmilano authored Dec 3, 2023
2 parents 1a2dc34 + 7a8bae5 commit 87d9344
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/com/dtmilano/android/adb/adbclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -1012,16 +1012,16 @@ def imageToData(self, image, output_type=None):
Helps in cases where the Views cannot be identified.
Returns the text found in the image and its bounding box.
:param image: the image (i.e. from takeScreenshot())
:param output_type: the output type (defualt: pytessearct.Output.DICT)
:param output_type: the output type (defualt: pytesseract.Output.DICT)
:return: the data from the image
"""
try:
import pytessearct
import pytesseract
except ImportError:
raise Exception("You have to install pytesseract to use imageToData()")
if not output_type:
output_type = pytessearct.Output.DICT
return pytessearct.image_to_data(image, output_type=output_type)
output_type = pytesseract.Output.DICT
return pytesseract.image_to_data(image, output_type=output_type)

def __transformPointByOrientation(self, xxx_todo_changeme, orientationOrig, orientationDest):
(x, y) = xxx_todo_changeme
Expand Down

0 comments on commit 87d9344

Please sign in to comment.