Skip to content

Commit

Permalink
don't raise Error on L img mode
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnth committed Dec 21, 2020
1 parent 97623be commit 7146c7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ocr4all_helpers/pagelineseg.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def segment(im, scale=None,
"""

colors = im.getcolors(2)
if im.mode != '1' and not (colors is not None and len(colors) == 2):
if (im.mode not in ['1', "L"]) and not (colors is not None and len(colors) == 2):
raise ValueError('Image is not bi-level')

# rotate input image for vertical lines
Expand Down

0 comments on commit 7146c7c

Please sign in to comment.