<?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 Open and add 4 JPEGs into a 2x2 window in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Open-and-add-4-JPEGs-into-a-2x2-window/m-p/752017#M93337</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;How do I write a script to open 4 jpegs in JMP and then place them in a 2x2 window? I would like to specify the size of the window to be a certain size. Then I would like to save the window into a jpeg.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appriciated! Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 03 May 2024 22:24:34 GMT</pubDate>
    <dc:creator>cchueng</dc:creator>
    <dc:date>2024-05-03T22:24:34Z</dc:date>
    <item>
      <title>Open and add 4 JPEGs into a 2x2 window</title>
      <link>https://community.jmp.com/t5/Discussions/Open-and-add-4-JPEGs-into-a-2x2-window/m-p/752017#M93337</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;How do I write a script to open 4 jpegs in JMP and then place them in a 2x2 window? I would like to specify the size of the window to be a certain size. Then I would like to save the window into a jpeg.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appriciated! Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2024 22:24:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-and-add-4-JPEGs-into-a-2x2-window/m-p/752017#M93337</guid>
      <dc:creator>cchueng</dc:creator>
      <dc:date>2024-05-03T22:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Open and add 4 JPEGs into a 2x2 window</title>
      <link>https://community.jmp.com/t5/Discussions/Open-and-add-4-JPEGs-into-a-2x2-window/m-p/752035#M93338</link>
      <description>&lt;P&gt;Here is a simple example of one way to handle the question&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1714788153213.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63922iF4CE108910245415/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1714788153213.png" alt="txnelson_0-1714788153213.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

image1 = New Image( "$SAMPLE_IMAGES/windmap.png" );
image2 = New Image( "$SAMPLE_IMAGES/black rhino footprint.jpg" );
image3 = New Image( "$SAMPLE_IMAGES/tile.jpg" );
image4 = New Image( "$SAMPLE_IMAGES/pi.gif" );

nw = New Window( "Pictures",
	Outline Box( "The Pictures",
		Lineup Box( N Col( 2 ), image1, image2, image3, image4 )
	)
);

theWholePicture = nw[Outline Box( 1 )] &amp;lt;&amp;lt; get picture;

theWholePicture &amp;lt;&amp;lt; save image( "$TEMP/myPicture.jpg,", "jpg" );

nw &amp;lt;&amp;lt; close window;

theSavedImage = New Image( "$TEMP/myPicture.jpg," );

theNW = New Window( "Final Picture", theSavedImage );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can set the images sizes by using&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;img &amp;lt;&amp;lt; Set Size( {600, 600} );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See the Scripting Index for the messages that can be used with New Image&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2024 02:05:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-and-add-4-JPEGs-into-a-2x2-window/m-p/752035#M93338</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-05-04T02:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Open and add 4 JPEGs into a 2x2 window</title>
      <link>https://community.jmp.com/t5/Discussions/Open-and-add-4-JPEGs-into-a-2x2-window/m-p/752100#M93346</link>
      <description>&lt;P&gt;I would go with the Lineup box like Jim did show as I think it is the simplest option. One other option (more complicated) is to use Graph Box and add images to it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

image1 = New Image("$SAMPLE_IMAGES/windmap.png");
image2 = New Image("$SAMPLE_IMAGES/black rhino footprint.jpg");
image3 = New Image("$SAMPLE_IMAGES/tile.jpg");
image4 = New Image("$SAMPLE_IMAGES/pi.gif");

nw = New Window("View Image",
	gb = Graph Box(
		FrameSize(500, 500),
		X Scale(0, 100),
		Y Scale(0, 100),
		SuppressAxes(1)
	)
);

fb = nw[FrameBox(1)];

fb &amp;lt;&amp;lt; Add Image(image(image1), bounds(top(0), Left(0), bottom(50), Right(50)));
fb &amp;lt;&amp;lt; Add Image(image(image2), bounds(top(0), Left(50), bottom(50), Right(100)));
fb &amp;lt;&amp;lt; Add Image(image(image3), bounds(top(100), Left(0), bottom(50), Right(50)));
fb &amp;lt;&amp;lt; Add Image(image(image4), bounds(top(100), Left(50), bottom(50), Right(100)));

img = fb &amp;lt;&amp;lt; get picture;
img &amp;lt;&amp;lt; save image("$TEMP/pic.png", "png");
nw &amp;lt;&amp;lt; close window;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At least one more technique can be found from this post &lt;A href="https://community.jmp.com/t5/Discussions/Merging-stitching-images/td-p/572472" target="_blank" rel="noopener"&gt;Merging/stitching images&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 May 2024 15:52:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-and-add-4-JPEGs-into-a-2x2-window/m-p/752100#M93346</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-05-04T15:52:16Z</dc:date>
    </item>
  </channel>
</rss>

