<?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: Scaled Image variables in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Scaled-Image-variables/m-p/395879#M64657</link>
    <description>&lt;P&gt;Definitely not sure if this is a best or even good approach but... I think using &amp;lt;&amp;lt; Scale() won't return return new image and will just update the old one. I think easiest solution would be to create a copy of col1 to colx and then scale that&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;col1 = Open(SD1 || samplename2 || "_a1_16col_filt.jpg", jpg);
col1 &amp;lt;&amp;lt; Scale(.16);
col1x = col1;
col1x &amp;lt;&amp;lt; Scale(1.5);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This should get you the original image first scaled to 0.16 and then a new image which will be the original image first scaled to 0.16 and then to 1.5 (thou it might be better to create copy before the 0.16 scaling and then scale to correct value).&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jun 2021 19:33:21 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2021-06-24T19:33:21Z</dc:date>
    <item>
      <title>Scaled Image variables</title>
      <link>https://community.jmp.com/t5/Discussions/Scaled-Image-variables/m-p/395868#M64654</link>
      <description>&lt;P&gt;Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the best approach to open a single image, scale to multiple sizes and save each scale size to a variable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently, I'm opening multiple images that are scaled and arranged so that the final picture will be copied and saved to Powerpoint. However, depending on types of images imported, two distinct arrangements are needed ("coltwin_1" and "coltwin_2" in attached script). One arrangement will have a different scale value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an example, I tried scaling an opened image and save&amp;nbsp; as "col1" which would be in "coltwin_1. The second scaled variable is "col1x" used in "coltwin_2" arrangement. However when using col1x = col1 &amp;lt;&amp;lt; Scale(1.5), the scale for col1 propagated through both layouts.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the best and cleanest approach to this issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neil&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;col1 = Open(SD1 || samplename2 || "_a1_16col_filt.jpg", jpg);
col1 &amp;lt;&amp;lt; Scale(.16);
col1x = col1 &amp;lt;&amp;lt; Scale(1.5);
	
col2 = Open(SD1 || samplename2 || "_a2_16col_filt.jpg", jpg);
col2 &amp;lt;&amp;lt; Scale(.16);
col2x = col2 &amp;lt;&amp;lt; Scale(1.5);

coltwin_1 = Expr( 								// For surface orientation					
					V List Box(
						H List Box(
							sem1,
							col1 ,
							LT1 ,	
						),
						sp1 = Spacer Box( size(0, 50)),
						H List Box(
							sem2,
							col2,
							LT2,
						),
						sp2 = Spacer Box( size(0, 50)),
						H List Box(
							sem3,
							col3,
							LT3
						)			
					)
							
				);
					
		
	coltwin_2 =   Expr(									// For Xsec orientation			
						V List Box(

							H List Box(sem1,
								V Splitter Box(
									col1x,
									LT1x	
								),
							),
							sp1 = Spacer Box( size(0, 50)),
							
							H List Box(sem2,
								V Splitter Box(
									col2x,
									LT2x
								),
							),
							sp2 = Spacer Box( size(0, 50)),
							
							H List Box(sem3,
								V Splitter Box(
									col3x,
									LT3x
								),
							)				
						)	 	
					);  
				&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:15:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scaled-Image-variables/m-p/395868#M64654</guid>
      <dc:creator>NRW</dc:creator>
      <dc:date>2023-06-11T11:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Scaled Image variables</title>
      <link>https://community.jmp.com/t5/Discussions/Scaled-Image-variables/m-p/395879#M64657</link>
      <description>&lt;P&gt;Definitely not sure if this is a best or even good approach but... I think using &amp;lt;&amp;lt; Scale() won't return return new image and will just update the old one. I think easiest solution would be to create a copy of col1 to colx and then scale that&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;col1 = Open(SD1 || samplename2 || "_a1_16col_filt.jpg", jpg);
col1 &amp;lt;&amp;lt; Scale(.16);
col1x = col1;
col1x &amp;lt;&amp;lt; Scale(1.5);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This should get you the original image first scaled to 0.16 and then a new image which will be the original image first scaled to 0.16 and then to 1.5 (thou it might be better to create copy before the 0.16 scaling and then scale to correct value).&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 19:33:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scaled-Image-variables/m-p/395879#M64657</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-06-24T19:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Scaled Image variables</title>
      <link>https://community.jmp.com/t5/Discussions/Scaled-Image-variables/m-p/395897#M64658</link>
      <description>&lt;P&gt;Many thanks for the input.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the initial approach you suggested, but still got a situation where the secondary scaling factor still affected the initial col1 variable.. I attached a graphic showing what happened before / after commenting last line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="scale_a.PNG" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33782iA4CBEB1418E10043/image-size/large?v=v2&amp;amp;px=999" role="button" title="scale_a.PNG" alt="scale_a.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 20:12:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scaled-Image-variables/m-p/395897#M64658</guid>
      <dc:creator>NRW</dc:creator>
      <dc:date>2021-06-24T20:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Scaled Image variables</title>
      <link>https://community.jmp.com/t5/Discussions/Scaled-Image-variables/m-p/395898#M64659</link>
      <description>&lt;P&gt;Seems like you will have to create new image like col1x = New Image(col1);&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
img = Open("$SAMPLE_IMAGES/tile.jpg", jpg);
Show(img &amp;lt;&amp;lt; get size());
img &amp;lt;&amp;lt; scale(0.5);
Show(img &amp;lt;&amp;lt; get size());
img2 = img;
img2 &amp;lt;&amp;lt; Scale(2);
Show(img &amp;lt;&amp;lt; get size(), img2 &amp;lt;&amp;lt; get size());
img3 = New Image(img);
img3 &amp;lt;&amp;lt; scale(3);
Show(img &amp;lt;&amp;lt; get size(), img3 &amp;lt;&amp;lt; get size, img2 &amp;lt;&amp;lt; get size());&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Jun 2021 20:38:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scaled-Image-variables/m-p/395898#M64659</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-06-24T20:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Scaled Image variables</title>
      <link>https://community.jmp.com/t5/Discussions/Scaled-Image-variables/m-p/395901#M64660</link>
      <description>&lt;P&gt;Outstanding!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Works perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;BR /&gt;which includes how to properly use the "New Image" function. The attached code is what worked for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neil&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;col1 = Open(SD1 || samplename2 || "_a1_16col_filt.jpg", jpg);
	col1 &amp;lt;&amp;lt; Scale(.16);
	col1x = New Image(col1);
	col1x &amp;lt;&amp;lt; Scale(2.2);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 21:32:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scaled-Image-variables/m-p/395901#M64660</guid>
      <dc:creator>NRW</dc:creator>
      <dc:date>2021-06-24T21:32:23Z</dc:date>
    </item>
  </channel>
</rss>

