Skip to content

Commit 4b99bb5

Browse files
authored
Fix OSD logic
Exclude the osd extension from being appended to the end of the tesseract command. Use the 'osd' parameter as default value for the cli lang argument.
1 parent 968422d commit 4b99bb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pytesseract.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def run_tesseract(input_filename,
160160

161161
cmd_args += shlex.split(config)
162162

163-
if extension != 'box':
163+
if extension not in ('box', 'osd'):
164164
cmd_args.append(extension)
165165

166166
try:
@@ -335,7 +335,7 @@ def image_to_data(image,
335335

336336

337337
def image_to_osd(image,
338-
lang=None,
338+
lang='osd',
339339
config='',
340340
nice=0,
341341
output_type=Output.STRING):

0 commit comments

Comments
 (0)