hhatto / nude.py

Nudity detection with Python
MIT License
921 stars 131 forks source link

Fixes handling BytesIO correctly #21

Closed bobloy closed 3 years ago

bobloy commented 5 years ago

Passing a BytesIO object would be considered an instance of IOBase and therefore would not open it as an image.

Now, it will use Image.open on both strings and IOBase objects, but will accept PIL.Image objects as well in the else clause.

Darkempire78 commented 3 years ago

I was going to propose the same update

hhatto commented 3 years ago

Sorry for late reply. merged this

version 0.5.1 has been released, on PyPI.