<?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: Can JSL do a base64 conversion? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/61913#M33358</link>
    <description>&lt;P&gt;if you can do the base64 there, couldn't you just do&amp;nbsp;&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);
txt = log capture(
	img = newImage("$SAMPLE_IMAGES/windmap.png");
	print(img);
);
raw_string = Arg(Arg(parse(txt), 1), 1);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 29 Jun 2018 17:22:53 GMT</pubDate>
    <dc:creator>vince_faller</dc:creator>
    <dc:date>2018-06-29T17:22:53Z</dc:date>
    <item>
      <title>Can JSL do a base64 conversion?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/60790#M33077</link>
      <description>&lt;P&gt;Hi, is JSL capable of doing a base64 conversion of an image file?&amp;nbsp; (i.e. read in an image file like a .PNG and output its equivalent base64 text)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks, DJ&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 15:34:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/60790#M33077</guid>
      <dc:creator>djhanson</dc:creator>
      <dc:date>2018-06-21T15:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can JSL do a base64 conversion?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/60793#M33079</link>
      <description>&lt;P&gt;In JMP, select &lt;STRONG&gt;Help&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;JMP Help&lt;/STRONG&gt;. Then search for &lt;EM&gt;Base64&lt;/EM&gt;. Pops right up!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 15:46:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/60793#M33079</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2018-06-21T15:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can JSL do a base64 conversion?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/60794#M33080</link>
      <description>&lt;P&gt;Oddly enough, my JMP (12.2.0) Help menu doesn't show any references to Base64.&amp;nbsp; (search seems to be indexed too)&amp;nbsp; Are there references to it perhaps in a later version of JMP?&amp;nbsp; DJ&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 15:54:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/60794#M33080</guid>
      <dc:creator>djhanson</dc:creator>
      <dc:date>2018-06-21T15:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can JSL do a base64 conversion?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/60796#M33082</link>
      <description>&lt;P&gt;I used the current JMP 14.0 version. I confirmed that it is not provided by JMP 12.2.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 16:04:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/60796#M33082</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2018-06-21T16:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can JSL do a base64 conversion?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/60798#M33084</link>
      <description>&lt;P&gt;I apologize for mis-reading your request. The Base64 conversion capability comes with the Load Text File() function. You can specify a BLOB option with a Base64Compressed toggle (on|off). I cannot find anything about saving such a format.&lt;/P&gt;
&lt;P&gt;You might be able to use the JMP integration with R, Python, or MATLAB if they support this conversion.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 16:13:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/60798#M33084</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2018-06-21T16:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can JSL do a base64 conversion?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/60813#M33090</link>
      <description>&lt;P&gt;thanks Mark!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dumb question on my part:&amp;nbsp; I suppose blob to char() can't somehow do this?&amp;nbsp; For example:&lt;BR /&gt;x=blob to char("c:\myfolder\myfile.PNG","base64compressed");&amp;nbsp; and then the magic, somehow be able to save x as this format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm only asking this from reading John Ponte's interesting blog where he appeared to use char to blob() to read in a PNG as a base64 format:&amp;nbsp; (so my question is like the inverse of this of course)&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/t5/JMP-Blog/Embedding-images-in-JSL-scripts/ba-p/30080" target="_blank"&gt;https://community.jmp.com/t5/JMP-Blog/Embedding-images-in-JSL-scripts/ba-p/30080&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I see that JSL has a encode64 double() command, but perhaps this isn't enough here to do an image file conversion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks, DJ&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 17:47:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/60813#M33090</guid>
      <dc:creator>djhanson</dc:creator>
      <dc:date>2018-06-21T17:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can JSL do a base64 conversion?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/61151#M33224</link>
      <description>&lt;P&gt;When you read in an image in JSL it will show the image in the log as the base64 compressed text string. Try doing this to see the base64 representation:&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;img = newImage("$SAMPLE_IMAGES/windmap.png");
show(img);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ironically, I don't see a way to save that string other than cut &amp;amp; paste it from the log.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;John Ponte&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 14:04:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/61151#M33224</guid>
      <dc:creator>JohnPonte</dc:creator>
      <dc:date>2018-06-26T14:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can JSL do a base64 conversion?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/61891#M33354</link>
      <description>&lt;P&gt;Thanks All.&amp;nbsp; I eventually found a Python script to convert image files to base64.&amp;nbsp; Here's a snippet if it helps someone in the future, works quite well and very simplistic:&lt;BR /&gt;Python code:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;import base64&lt;BR /&gt;with open('C:/temp/myimage.png', 'rb') as x1, open('C:/temp/myimagebase64.txt', 'w') as x2:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; base64.encode(x1, x2)&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2018 15:06:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/61891#M33354</guid>
      <dc:creator>djhanson</dc:creator>
      <dc:date>2018-06-29T15:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can JSL do a base64 conversion?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/61913#M33358</link>
      <description>&lt;P&gt;if you can do the base64 there, couldn't you just do&amp;nbsp;&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);
txt = log capture(
	img = newImage("$SAMPLE_IMAGES/windmap.png");
	print(img);
);
raw_string = Arg(Arg(parse(txt), 1), 1);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Jun 2018 17:22:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/61913#M33358</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2018-06-29T17:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can JSL do a base64 conversion?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/450352#M69716</link>
      <description>&lt;P&gt;If you found this, you are looking for the Encode64Blob or Decode64Blob functions, see the scripting index.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 03:58:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JSL-do-a-base64-conversion/m-p/450352#M69716</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2022-01-11T03:58:26Z</dc:date>
    </item>
  </channel>
</rss>

