Skip to content

Commit

Permalink
Merge pull request #9 from wmetcalf/master
Browse files Browse the repository at this point in the history
Fix Screenshots to work with Pillow versions newer than 6.1
  • Loading branch information
doomedraven authored Jan 8, 2020
2 parents 8617ee9 + ce80166 commit 7411a35
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions analyzer/windows/lib/api/screenshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@
from PIL import ImageGrab
log.debug("Importing 'PIL.ImageDraw'")
from PIL import ImageDraw
from PIL import PILLOW_VERSION
try:
from PIL import __version__
except ImportError:
from PIL import PILLOW_VERSION as __version__
HAVE_PIL = True
if int(PILLOW_VERSION[0]) < 5:
if int(__version__[0]) < 5:
log.info("Please upgrade Pillow to >= 5.4.1 for best performance")

except Exception as e:
HAVE_PIL = False
log.error(e)
Expand Down

0 comments on commit 7411a35

Please sign in to comment.