<?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 JMP16  Save Image now needs image type in quotes in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JMP16-Save-Image-now-needs-image-type-in-quotes/m-p/377305#M62718</link>
    <description>&lt;P&gt;Appears that the image type argument in Save Image() now has to be in quotes.&lt;/P&gt;&lt;P&gt;The scripting index does not reflect this and its example code does not work in version 16.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the sample code, the Open() works with jpg as an argument,&amp;nbsp; but the Save Image() says "name unresolved jpg in access or evaluation of 'jpg':&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;img = Open( "$SAMPLE_IMAGES/tile.jpg", jpg );
obj = New Window( "tile(40,40)", img );
img &amp;lt;&amp;lt; Save Image("C:/temp/Mediterranean.jpg", jpg);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Putting jpg (or other file types) in quotes &lt;EM&gt;does&lt;/EM&gt; work - it doesn't just not fail but will save in the type requested.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 22:11:12 GMT</pubDate>
    <dc:creator>hardner</dc:creator>
    <dc:date>2023-06-09T22:11:12Z</dc:date>
    <item>
      <title>JMP16  Save Image now needs image type in quotes</title>
      <link>https://community.jmp.com/t5/Discussions/JMP16-Save-Image-now-needs-image-type-in-quotes/m-p/377305#M62718</link>
      <description>&lt;P&gt;Appears that the image type argument in Save Image() now has to be in quotes.&lt;/P&gt;&lt;P&gt;The scripting index does not reflect this and its example code does not work in version 16.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the sample code, the Open() works with jpg as an argument,&amp;nbsp; but the Save Image() says "name unresolved jpg in access or evaluation of 'jpg':&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;img = Open( "$SAMPLE_IMAGES/tile.jpg", jpg );
obj = New Window( "tile(40,40)", img );
img &amp;lt;&amp;lt; Save Image("C:/temp/Mediterranean.jpg", jpg);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Putting jpg (or other file types) in quotes &lt;EM&gt;does&lt;/EM&gt; work - it doesn't just not fail but will save in the type requested.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:11:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP16-Save-Image-now-needs-image-type-in-quotes/m-p/377305#M62718</guid>
      <dc:creator>hardner</dc:creator>
      <dc:date>2023-06-09T22:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: JMP16  Save Image now needs image type in quotes</title>
      <link>https://community.jmp.com/t5/Discussions/JMP16-Save-Image-now-needs-image-type-in-quotes/m-p/377400#M62727</link>
      <description>&lt;P&gt;Thanks for posting this finding, I think you should report it to:&amp;nbsp;support@jmp.com&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 17:54:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP16-Save-Image-now-needs-image-type-in-quotes/m-p/377400#M62727</guid>
      <dc:creator>Georg</dc:creator>
      <dc:date>2021-04-16T17:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: JMP16  Save Image now needs image type in quotes</title>
      <link>https://community.jmp.com/t5/Discussions/JMP16-Save-Image-now-needs-image-type-in-quotes/m-p/377415#M62729</link>
      <description>&lt;P&gt;JMP is correcting some implementation details. No idea if this correction was intentional or a side effect. The problem with the unquoted name is that you can't make it a variable. Imagine writing your own save dialog, where the dialog allows selecting the save-as type. You'd have to keep N separate calls to the save function, and an &lt;EM&gt;if&lt;/EM&gt; statement to select one of the calls. With a variable set to the save-as type, it is cleaner.&lt;/P&gt;&lt;P&gt;In general, if JMP will accept a quoted string or an unquoted name, you'll want to use the quoted string. It looks a little uglier, unless you think about the flexibility it implies.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 18:56:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP16-Save-Image-now-needs-image-type-in-quotes/m-p/377415#M62729</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-04-16T18:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: JMP16  Save Image now needs image type in quotes</title>
      <link>https://community.jmp.com/t5/Discussions/JMP16-Save-Image-now-needs-image-type-in-quotes/m-p/377474#M62733</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp; I do understand and appreciate the motivation. I don't have to imagine wanting to have options be variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the "transition" seems confusing.&amp;nbsp; &amp;nbsp;Quite a few cases have been producing "Unquoted JSL name processed as a literal" warnings in earlier versions and I've been diligently eliminating those from my fairly extensive JSL code base.&amp;nbsp; With a lot of code to maintain it was very helpful to have warnings of what to change.&amp;nbsp; &amp;nbsp; But this SaveImage() example does not give a warning in 15.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Meanwhile other things that &lt;EM&gt;did&lt;/EM&gt; give a warning (and I have duly changed!) still work in 16.&amp;nbsp;&lt;/P&gt;&lt;P&gt;(when I first found this Save Image issue I thought maybe all those warnings were now enforced rules in 16, but no)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An example of that is this example code (from the Scripting Index) for caption:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Caption(
	{100, 200},
	"explanation",
	Font( "Arial Black" ),
	Font Size( 16 ),
	Text Color( "blue" ),
	Back Color( "yellow" ),
	Spoken( 1 )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In 15 you get a warning if you don't have quotes around blue and yellow but it still works in 16 (and no longer gives a warning!).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, just noting it's confusing when some cases fail and others don't, some trigger warnings and others don't, code that JMP itself provided via the red arrow--&amp;gt; save script in the past used this disfavored method and some of the documentation still shows it as examples.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm on the alert now that I might have missed other 15/16 incompatibilities around this despite having done testing and&amp;nbsp; I'll be trying to proactively find places to add quotes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 21:03:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP16-Save-Image-now-needs-image-type-in-quotes/m-p/377474#M62733</guid>
      <dc:creator>hardner</dc:creator>
      <dc:date>2021-04-16T21:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: JMP16  Save Image now needs image type in quotes</title>
      <link>https://community.jmp.com/t5/Discussions/JMP16-Save-Image-now-needs-image-type-in-quotes/m-p/377506#M62737</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5579"&gt;@Wendy_Murphrey&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 23:32:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP16-Save-Image-now-needs-image-type-in-quotes/m-p/377506#M62737</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-04-16T23:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: JMP16  Save Image now needs image type in quotes</title>
      <link>https://community.jmp.com/t5/Discussions/JMP16-Save-Image-now-needs-image-type-in-quotes/m-p/378431#M62817</link>
      <description>&lt;P&gt;Thanks for pointing this out,&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/4098"&gt;@hardner&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The change in behavior for the image type argument for Save Image() was recently reported.&amp;nbsp; We do expect that the Scripting Index (Help &amp;gt; Scripting Index) will be updated to demonstrate the requirement for double-quoting of the image type argument.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With regard to the overall confusion, Craige's explanation is correct.&amp;nbsp; It is a work in progress.&amp;nbsp; Feel free to report any inconsistencies you encounter in the future to JMP Technical Support, support@jmp.com.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 16:29:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP16-Save-Image-now-needs-image-type-in-quotes/m-p/378431#M62817</guid>
      <dc:creator>Wendy_Murphrey</dc:creator>
      <dc:date>2021-04-20T16:29:51Z</dc:date>
    </item>
  </channel>
</rss>

