我用了这个Python
script(灵感来自这里)
#! /usr/bin/python
import pygtk
pygtk.require('2.0')
import gtk
import os
import sys
def copy_image(f):
assert os.path.exists(f), "file does not exist"
image = gtk.gdk.pixbuf_new_from_file(f)
clipboard = gtk.clipboard_get()
clipboard.set_image(image)
clipboard.store()
if __name__ == "__main__":
copy_image(sys.argv[1])
将图像复制到剪贴板。 运行后
python imgclip.py img.png
我想用ctrl+V将图像粘贴到Inkscape
,但是Inkscape
写入
Nothing on the clipboard
。在
你知道如何更正这个错误,以便将图像复制到剪贴板,然后粘贴到Inkscape
?在
操作系统:Ubuntu 12.04
目前没有回答
相关问题 更多 >
编程相关推荐