robinchenyu / imagepaste

MIT License
25 stars 14 forks source link

Not working , build 3114 win 10 #1

Open Pandahisham opened 8 years ago

Pandahisham commented 8 years ago

I have python 3 installed is that the reason ? PIL seems to support py 2 only

robinchenyu commented 8 years ago

I installed python3.5 in win7, it is worked right. The PIL is corresponding to 3.3.6, which I have packaged with ImagePaste.

You may try with below steps:

  1. install pillow package
  2. write a test.py with below contents
try:
    from PIL import ImageGrab
    from PIL import ImageFile
except ImportError:
    import sys
    from PIL import ImageGrab
    from PIL import ImageFile

ImageFile.LOAD_TRUNCATED_IMAGES = True
im = ImageGrab.grabclipboard()
im.save('pic.png','PNG')
  1. take a screencapture and run ./test.py
Pandahisham commented 8 years ago

` Traceback (most recent call last): File "C:\Users\Hisham\Desktop\test.py", line 11, in im.save('pic.png','PNG') AttributeError: 'NoneType' object has no attribute 'save'

`

robinchenyu commented 8 years ago

Pls take a screen capture to make sure there is a picture in clipboard, and then run test.py

Pandahisham commented 8 years ago

I did take a screenshot , it was in my clipboard , i was able to paste in other place . is it related to win 10 ?

robinchenyu commented 8 years ago

Maybe, I have tested in win7, it is ok.