Saves an image from clipboard to a file.
image-clipboard-to-file.py and run it with
Note: Some distributions such as Arch Linux renamed Python 2 to
python2 instead of
Arch Linux users can install the image-clipboard-to-file package from the AUR.
Thanks to Paweł Pałucha who posted this script on this stackoverflow discussion. I share it here to allow package maintainers to easily package it for their distribution.
I added a single line to the end of the script to make it even more useful:
By adding the sys.exit it is now possible to issue an alternative command when there is no image in the clipboard buffer. I used this to create a "Launcher" button on my desktop:
When an image is in the clipboard buffer and I click the button, gimp will open with the image. Otherwise gimp will open as normal with an empty document.