<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Send Image to Clipboard in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Send-Image-to-Clipboard/m-p/48213#M27451</link>
    <description>&lt;P&gt;It might be more straightforward to just save the graphic you want and then pick it back up with the other program&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//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 &amp;lt;&amp;lt; Report;
//three ways to get a picture
bb2 = r[border box (2)] &amp;lt;&amp;lt;Get Picture;
bb2 = r[border box (2)] &amp;lt;&amp;lt;Save Capture( "/Users/bywing/Downloads/eraseme.png",png);
bb2 = r[border box (2)] &amp;lt;&amp;lt;Save Picture( "/Users/bywing/Downloads/eraseme.png",png);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I'm interested in trying to get this idea of pasting an graphic to the clipboard and picking it up with something else.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've used this expression to copy a data table to the clipboard:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;main menu("Copy With Column Names")&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I tried&amp;nbsp;this approach to get the image, but it doesn't seem to work.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;bb2 = r[border box (2)] &amp;lt;&amp;lt; select;
current window()&amp;lt;&amp;lt;main menu ("Copy");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When I past this, I just get the evaluated expression, not the image.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Dec 2017 19:50:02 GMT</pubDate>
    <dc:creator>Byron_JMP</dc:creator>
    <dc:date>2017-12-05T19:50:02Z</dc:date>
    <item>
      <title>Send Image to Clipboard</title>
      <link>https://community.jmp.com/t5/Discussions/Send-Image-to-Clipboard/m-p/48212#M27450</link>
      <description>&lt;P&gt;How can I save an image to the clipboard such that it can be pasted into other programs, similar to Copy Graph in Graph Builder?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This saves the image as text:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;img = Open("$Sample_Images/black rhino footprint.jpg", jpg);
Set Clipboard( img );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I cannot paste this into an email, etc.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 19:17:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Send-Image-to-Clipboard/m-p/48212#M27450</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2017-12-05T19:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Send Image to Clipboard</title>
      <link>https://community.jmp.com/t5/Discussions/Send-Image-to-Clipboard/m-p/48213#M27451</link>
      <description>&lt;P&gt;It might be more straightforward to just save the graphic you want and then pick it back up with the other program&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//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 &amp;lt;&amp;lt; Report;
//three ways to get a picture
bb2 = r[border box (2)] &amp;lt;&amp;lt;Get Picture;
bb2 = r[border box (2)] &amp;lt;&amp;lt;Save Capture( "/Users/bywing/Downloads/eraseme.png",png);
bb2 = r[border box (2)] &amp;lt;&amp;lt;Save Picture( "/Users/bywing/Downloads/eraseme.png",png);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I'm interested in trying to get this idea of pasting an graphic to the clipboard and picking it up with something else.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've used this expression to copy a data table to the clipboard:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;main menu("Copy With Column Names")&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I tried&amp;nbsp;this approach to get the image, but it doesn't seem to work.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;bb2 = r[border box (2)] &amp;lt;&amp;lt; select;
current window()&amp;lt;&amp;lt;main menu ("Copy");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When I past this, I just get the evaluated expression, not the image.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 19:50:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Send-Image-to-Clipboard/m-p/48213#M27451</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2017-12-05T19:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Send Image to Clipboard</title>
      <link>https://community.jmp.com/t5/Discussions/Send-Image-to-Clipboard/m-p/48214#M27452</link>
      <description>&lt;P&gt;Your&amp;nbsp;Get Picture and Save Picture messages reminded me of Copy Picture, which does work for a picture box.&amp;nbsp; Leveraging a picture box and copy picture gives the function below.&amp;nbsp; There must be a more straightforward way though...&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here( 1 );

PicToClipboard = Function( {img},
	win = New Window("temp",
		pb = Picture Box( img )
	);

	pb &amp;lt;&amp;lt; Copy Picture;

	win &amp;lt;&amp;lt; Close Window();	
);

&lt;BR /&gt;//Get an image from "New image()", "&amp;lt;&amp;lt; Get Picture", etc:
img = New image("$Sample_Images/black rhino footprint.jpg");
&lt;BR /&gt;//Save it to the clipboard
PicToClipboard( img );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Dec 2017 20:02:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Send-Image-to-Clipboard/m-p/48214#M27452</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2017-12-05T20:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Send Image to Clipboard</title>
      <link>https://community.jmp.com/t5/Discussions/Send-Image-to-Clipboard/m-p/48216#M27453</link>
      <description>&lt;P&gt;This code is simpler; no &lt;STRONG&gt;new window&lt;/STRONG&gt; required.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here( 1 );

//Get an image from "New image()", "&amp;lt;&amp;lt; Get Picture", etc:
img = New image("$Sample_Images/black rhino footprint.jpg");
pb = Picture Box( img );
pb &amp;lt;&amp;lt; Copy Picture;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Dec 2017 20:29:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Send-Image-to-Clipboard/m-p/48216#M27453</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2017-12-05T20:29:14Z</dc:date>
    </item>
  </channel>
</rss>

