diff --git a/pyrobot.py b/pyrobot.py index 8543117..0fd1212 100644 --- a/pyrobot.py +++ b/pyrobot.py @@ -315,10 +315,10 @@ def take_screenshot(self, bounds=None): ''' try: - import Image + from PIL import Image except ImportError as e: print e - print "Need to have PIL installed! See: effbot.org for download" + print "Need to have PIL or Pillow installed! See: effbot.org or pypi.python.org for download" sys.exit() return self._make_image_from_buffer(self._get_screen_buffer(bounds)) @@ -370,7 +370,7 @@ def _get_screen_buffer(self, bounds=None): return hCaptureBitmap def _make_image_from_buffer(self, hCaptureBitmap): - import Image + from PIL import Image bmp_info = BITMAPINFO() bmp_header = BITMAPFILEHEADER() hdc = windll.user32.GetDC(None) @@ -924,22 +924,3 @@ def get_cpus(): robot = Robot() text = robot.get_clipboard_data() print text - - - - - - - - - - - - - - - - - - -