将图像发送到剪贴板如何将图像保存到剪贴板以便粘贴到其他程序中,类似于 Graph Builder 中的 Copy Graph?
这会将图像保存为文本:
img = Open("$Sample_Images/black rhino footprint.jpg", jpg);
Set Clipboard( img );
但我无法将其粘贴到电子邮件等中。
回复:将图像发送到剪贴板这段代码更简单;不新窗户必需的。
Names default to here( 1 );
//Get an image from "New image()", "<< Get Picture", etc:
img = New image("$Sample_Images/black rhino footprint.jpg");
pb = Picture Box( img );
pb << Copy Picture;
回复:将图像发送到剪贴板您的获取图片和保存图片消息让我想起了复制图片,它确实适用于图片框。利用图片框和复制图片提供以下功能。必须有一个更直接的方法,但...
Names default to here( 1 );
PicToClipboard = Function( {img},
win = New Window("temp",
pb = Picture Box( img )
);
pb << Copy Picture;
win << Close Window();
);
<BR />//Get an image from "New image()", "<< Get Picture", etc:
img = New image("$Sample_Images/black rhino footprint.jpg");
<BR />//Save it to the clipboard
PicToClipboard( img );回复:将图像发送到剪贴板只保存您想要的图形然后用其他程序将其取回可能更直接
//run this again Abrasion.jmp from the sample data
obj=Distribution(
Continuous Distribution(
Column( :Abrasion ),
PpK Capability Labeling( 1 ),
Customize Summary Statistics( N Missing( 1 ), N Unique( 1 ) )
)
);
r = obj << Report;
//three ways to get a picture
bb2 = r[border box (2)] <<GET picture=""></GET>
我有兴趣尝试获得将图形粘贴到剪贴板并用其他东西拾取它的想法。
我使用此表达式将数据表复制到剪贴板:
main menu("Copy With Column Names")
我试过这种方法来获取图像,但它似乎不起作用。
bb2 = r[border box (2)] << select;
current window()<<MAIN menu=""></MAIN>
当我通过这个时,我只得到评估的表达式,而不是图像。