Skip to content

Commit

Permalink
fix param name
Browse files Browse the repository at this point in the history
  • Loading branch information
lededev committed Feb 6, 2022
1 parent f3c95cc commit 90cf72b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ddddocr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1587,11 +1587,11 @@ def classification(self, img):
if not isinstance(img, (bytes, str, pathlib.PurePath, Image.Image)):
raise TypeError("未知图片类型")
if isinstance(img, bytes):
image = Image.open(io.BytesIO(img_bytes))
image = Image.open(io.BytesIO(img))
elif isinstance(img, Image.Image):
image = img.copy()
elif isinstance(img, str):
image = base64_to_image(img_base64)
image = base64_to_image(img)
else:
assert isinstance(img, pathlib.PurePath)
image = Image.open(img)
Expand Down

0 comments on commit 90cf72b

Please sign in to comment.