ponty / pyscreenshot

Python screenshot library, replacement for the Pillow ImageGrab module on Linux.
BSD 2-Clause "Simplified" License
499 stars 89 forks source link

how to save clipboard image as file #86

Closed sant527 closed 1 year ago

sant527 commented 3 years ago

I want to convert clipboard image content into an image

I tried

from PIL import ImageGrab
im = ImageGrab.grabclipboard() is macOS and Windows only
im.save(filename)

it says ImageGrab.grabclipboard() is macOS and Windows only

I think using this library its can be possible

ponty commented 3 years ago

Use latest Pillow version. https://pillow.readthedocs.io/en/latest/reference/ImageGrab.html

You can also use this lib. Check the README