<?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: Open Image (jpg) Files, Perform Analysis and move onto next Image in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Open-Image-jpg-Files-Perform-Analysis-and-move-onto-next-Image/m-p/15876#M14500</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This should put the image files in a folder into a JMP table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #008f00;"&gt;&lt;SPAN&gt;// &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:ian.cox@jmp.com"&gt;ian.cox@jmp.com&lt;/A&gt;&lt;SPAN&gt;:23Jun2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; min-height: 14px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #032ce4;"&gt;Names Default To Here&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; min-height: 14px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;dir &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Pick Directory&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"Pick a directory containing image files:"&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #000000;"&gt;fList &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;FilesInDirectory&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;dir&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; min-height: 14px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #032ce4;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NItems&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;fList&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Print&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"No files found in folder "&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;dir&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;"."&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Beep&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Throw&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;())&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NewTable&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"Images from "&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;dir&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NewColumn&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"File Path"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Character&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Nominal&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NewColumn&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"Image"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Expression&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; AddRows&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #032ce4;"&gt;NItems&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;fList&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN style="color: #032ce4;"&gt;for&lt;/SPAN&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;f&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; f&lt;SPAN style="color: #011993;"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Nitems&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;fList&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; f&lt;SPAN style="color: #011993;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;fp &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; dir&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&gt;"/"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;fList&lt;STRONG&gt;[&lt;/STRONG&gt;f&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;dt&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;"File Path"&lt;/SPAN&gt;&lt;STRONG&gt;)[&lt;/STRONG&gt;f&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; fp&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #008f00;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Try&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;dt&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&gt;"Image"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)[&lt;/STRONG&gt;f&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NewImage&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;fp&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;// Use 'Try()' in case it's not an image file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Dec 2015 14:51:55 GMT</pubDate>
    <dc:creator>ian_jmp</dc:creator>
    <dc:date>2015-12-09T14:51:55Z</dc:date>
    <item>
      <title>Open Image (jpg) Files, Perform Analysis and move onto next Image</title>
      <link>https://community.jmp.com/t5/Discussions/Open-Image-jpg-Files-Perform-Analysis-and-move-onto-next-Image/m-p/15875#M14499</link>
      <description>&lt;P&gt;I am very interested in using JMP to do automatic image processing and analysis and I have a script ( heavily based on John Pontes add-in - and information gathered from his excellent blog &lt;A title="http://blogs.sas.com/content/jmp/author/johnponte/" href="http://blogs.sas.com/content/jmp/author/johnponte/" target="_blank"&gt;John Ponte, Author at JMP Blog&lt;/A&gt;)&amp;nbsp; that I can run on one image at a time on images but what I really want to do next is to create&amp;nbsp; a 'looping' script that does the following&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;counts the number of .jpg files in a directory.&lt;/LI&gt;
&lt;LI&gt;one-by-one opens an image, puts the information available ( I'm using John Pontes Image analyser add-in and script for this) into a data table&lt;/LI&gt;
&lt;LI&gt;does a basic analysis ( mean of columns &amp;amp; rows etc.)&lt;/LI&gt;
&lt;LI&gt;saves this with the jpg filename&lt;/LI&gt;
&lt;LI&gt;closes the files down and moves onto the next image.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a number of small problems with this but the main ones are that when I use the following&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;For&lt;/SPAN&gt;&lt;STRONG style="; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; i &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;=&lt;/SPAN&gt; &lt;STRONG style="; color: #008080; font-size: 10pt; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; i &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;N Items&lt;/SPAN&gt;&lt;STRONG style="; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; files &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; i&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;If&lt;/SPAN&gt;&lt;STRONG style="; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;Ends With&lt;/SPAN&gt;&lt;STRONG style="; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; files&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #800080; font-size: 10pt; font-family: Consolas;"&gt;".jpg"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;Open&lt;/SPAN&gt;&lt;STRONG style="; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; files&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;the open ( files&lt;I&gt;); opens the jpg files in another program ( the default prog that I don't want to change). How do I get it so that it opens up in JMP using the following ( or something else if it's better)&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;img &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;New Image&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Consolas;"&gt;"thefilenameofthe.jpg"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; )&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;w &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Consolas;"&gt;New Window&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Consolas;"&gt;"image"&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; img )&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;I can then perform the analysis and close this all down and loop back around until all of the images have been analysed.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[*Edit to original post by staff member sseligman. Second part of user question added here to original post.]&lt;/P&gt;
&lt;P&gt;Many apologies, I wasn't clear enough in my original post. What I want to do is to put the pixel information into a data table, not the original image itself.&lt;/P&gt;
&lt;P&gt;this is, in effect, automating the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.jmp.com/docs/DOC-6100" target="_blank"&gt;ImageToDatatable JSL&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;script that has already been written but go through each image within a folder and save the resulting data table with any resultant analysis of the pixels in the same folder.&lt;/P&gt;
&lt;P&gt;the x &amp;amp; y co-ordinates along with the RGB, I and HSL are sufficient for me to carry out any analysis I require. I have attached an example data table that I can perform analysis on, I have also attached the original image where this data was taken from, I have a few thousand of these which I need to go through so doing them one at a time would be nearly impossible.&lt;/P&gt;
&lt;P&gt;apologies again for the bad wording and lack of clarity in the original post.&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Consolas;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;David&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 16:05:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-Image-jpg-Files-Perform-Analysis-and-move-onto-next-Image/m-p/15875#M14499</guid>
      <dc:creator>d_barnett</dc:creator>
      <dc:date>2017-12-08T16:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Open Image (jpg) Files, Perform Analysis and move onto next Image</title>
      <link>https://community.jmp.com/t5/Discussions/Open-Image-jpg-Files-Perform-Analysis-and-move-onto-next-Image/m-p/15876#M14500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This should put the image files in a folder into a JMP table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #008f00;"&gt;&lt;SPAN&gt;// &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:ian.cox@jmp.com"&gt;ian.cox@jmp.com&lt;/A&gt;&lt;SPAN&gt;:23Jun2014&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; min-height: 14px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #032ce4;"&gt;Names Default To Here&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; min-height: 14px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;dir &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Pick Directory&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"Pick a directory containing image files:"&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #000000;"&gt;fList &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;FilesInDirectory&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;dir&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; min-height: 14px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #032ce4;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NItems&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;fList&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Print&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"No files found in folder "&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;dir&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;"."&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Beep&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Throw&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;())&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NewTable&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"Images from "&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;dir&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NewColumn&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"File Path"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Character&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Nominal&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NewColumn&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"Image"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Expression&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; AddRows&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #032ce4;"&gt;NItems&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;fList&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN style="color: #032ce4;"&gt;for&lt;/SPAN&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;f&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; f&lt;SPAN style="color: #011993;"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Nitems&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;fList&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; f&lt;SPAN style="color: #011993;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;fp &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; dir&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&gt;"/"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt;fList&lt;STRONG&gt;[&lt;/STRONG&gt;f&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;dt&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #942193;"&gt;"File Path"&lt;/SPAN&gt;&lt;STRONG&gt;)[&lt;/STRONG&gt;f&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; fp&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #008f00;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Try&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;dt&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&gt;"Image"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)[&lt;/STRONG&gt;f&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;NewImage&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;fp&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;// Use 'Try()' in case it's not an image file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2015 14:51:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-Image-jpg-Files-Perform-Analysis-and-move-onto-next-Image/m-p/15876#M14500</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2015-12-09T14:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Open Image (jpg) Files, Perform Analysis and move onto next Image</title>
      <link>https://community.jmp.com/t5/Discussions/Open-Image-jpg-Files-Perform-Analysis-and-move-onto-next-Image/m-p/15877#M14501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;add the file type parameter.&amp;nbsp; then the returned value will be a picture object.&amp;nbsp; It will probably work even if you mix and match PNG, JPG, GIF; it tells JMP to return the picture rather than falling back on the OS default program for the extension.&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;open("$desktop/setFont.PNG","PNG")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;New Image(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Char To Blob(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; "640745eJxkugdUU0v3PgyCIFKiotKDCsL10ovUEFBQRJodKQJKLyF0gpSIKIjSpEgnCgoqVVrooRk6obcACUaaG...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;or use newimage to get the picture object.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;newimage("$desktop/setFont.PNG")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;New Image(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Char To Blob(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; "640745eJxkugdUU0v3PgyCIFKiotKDCsL10ovUEFBQRJodKQJKLyF0gpSIKIjSpEgnCgoqVVrooRk6obcACUaaG...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;newimage is simpler; open might be needed if the image is a URL or Blob.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2015 15:25:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-Image-jpg-Files-Perform-Analysis-and-move-onto-next-Image/m-p/15877#M14501</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2015-12-09T15:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Open Image (jpg) Files, Perform Analysis and move onto next Image</title>
      <link>https://community.jmp.com/t5/Discussions/Open-Image-jpg-Files-Perform-Analysis-and-move-onto-next-Image/m-p/15878#M14502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many apologies, I wasn't clear enough in my original post. What I want to do is to put the pixel information into a data table, not the original image itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is, in effect, automating the &lt;A href="https://community.jmp.com/docs/DOC-6100" target="_blank"&gt;ImageToDatatable JSL&lt;/A&gt; script that has already been written but go through each image within a folder and save the resulting data table with any resultant analysis of the pixels in the same folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the x &amp;amp; y co-ordinates along with the RGB, I and HSL are sufficient for me to carry out any analysis I require. I have attached an example data table that I can perform analysis on, I have also attached the original image where this data was taken from, I have a few thousand of these which I need to go through so doing them one at a time would be nearly impossible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;apologies again for the bad wording and lack of clarity in the original post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 13:23:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-Image-jpg-Files-Perform-Analysis-and-move-onto-next-Image/m-p/15878#M14502</guid>
      <dc:creator>d_barnett</dc:creator>
      <dc:date>2016-10-28T13:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Open Image (jpg) Files, Perform Analysis and move onto next Image</title>
      <link>https://community.jmp.com/t5/Discussions/Open-Image-jpg-Files-Perform-Analysis-and-move-onto-next-Image/m-p/15879#M14503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_macro_quote jive_text_macro"&gt;&lt;P&gt;path = "$desktop/temp/";&lt;/P&gt;&lt;P&gt;files = Files In Directory( path );&lt;/P&gt;&lt;P&gt;For( ifile = 1, ifile &amp;lt;= N Items( files ), ifile++,&lt;/P&gt;&lt;P&gt;&amp;nbsp; filename = files[ifile];&lt;/P&gt;&lt;P&gt;&amp;nbsp; If( Right( filename, 4 ) == ".jpg",&lt;/P&gt;&lt;P&gt;&amp;nbsp; pic = Open( path || filename, "jpg" );&lt;/P&gt;&lt;P&gt;&amp;nbsp; jslcolor = pic &amp;lt;&amp;lt; getpixels();&lt;/P&gt;&lt;P&gt;&amp;nbsp; {red, green, blue} = Color To RGB( jslcolor );&lt;/P&gt;&lt;P&gt;&amp;nbsp; {hue, lightness, saturation} = Color To HLS( jslcolor );&lt;/P&gt;&lt;P&gt;&amp;nbsp; nr = N Rows( jslcolor );&lt;/P&gt;&lt;P&gt;&amp;nbsp; nc = N Cols( jslcolor );&lt;/P&gt;&lt;P&gt;&amp;nbsp; dt = New Table( Substr( filename, 1, Length( filename ) - 4 ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; addrows( nr * nc ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; New Column( "x" ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; New Column( "y" ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; New Column( "red", setvalues( red ) ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; New Column( "green", setvalues( green ) ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; New Column( "blue", setvalues( blue ) ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; New Column( "hue", setvalues( hue ) ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; New Column( "lightness", setvalues( lightness ) ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; New Column( "saturation", setvalues( saturation ) ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&amp;nbsp; irow = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; For( iy = 1, iy &amp;lt;= nr, iy++,&lt;/P&gt;&lt;P&gt;&amp;nbsp; For( ix = 1, ix &amp;lt;= nc, ix++,&lt;/P&gt;&lt;P&gt;&amp;nbsp; irow++;&lt;/P&gt;&lt;P&gt;&amp;nbsp; dt:y[irow] = iy;&lt;/P&gt;&lt;P&gt;&amp;nbsp; dt:x[irow] = ix;&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&amp;nbsp; // do something with dt&lt;/P&gt;&lt;P&gt;&amp;nbsp; Wait( 1 );&lt;/P&gt;&lt;P&gt;&amp;nbsp; Close( dt, "nosave" );&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Dec 2015 17:37:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-Image-jpg-Files-Perform-Analysis-and-move-onto-next-Image/m-p/15879#M14503</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2015-12-11T17:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Open Image (jpg) Files, Perform Analysis and move onto next Image</title>
      <link>https://community.jmp.com/t5/Discussions/Open-Image-jpg-Files-Perform-Analysis-and-move-onto-next-Image/m-p/15880#M14504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just came across this post and thought I'd add a couple of points, in case it is still helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing I'll suggest is that you can use NewImage(), instead of Open() for the image file. Open() is a more general function that has to figure out what you are opening. In that process, it uses OS functionality, like opening your image in another program. img = NewImage("filename.jpg"); will open the image file and create a JSL image, returning you the handle to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other suggestion is that you can use another script I did (before the Image Analyzer) on the File Exchange, called &lt;A _jive_internal="true" href="https://community.jmp.com/docs/DOC-6100"&gt;ImageToDatatable&lt;/A&gt;. It will convert your image into a data table, similarly to the Image Analyzer, but you won't get all the rest of what the Image Analyzer does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wrap that in the loop as &lt;A href="https://community.jmp.com/people/Craige@JMP"&gt;Craige@JMP&lt;/A&gt; shows (above) and you should be good to go.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 19:48:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-Image-jpg-Files-Perform-Analysis-and-move-onto-next-Image/m-p/15880#M14504</guid>
      <dc:creator>JohnPonte</dc:creator>
      <dc:date>2016-07-18T19:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Open Image (jpg) Files, Perform Analysis and move onto next Image</title>
      <link>https://community.jmp.com/t5/Discussions/Open-Image-jpg-Files-Perform-Analysis-and-move-onto-next-Image/m-p/48338#M27518</link>
      <description>&lt;P&gt;Consolidating two replies to this post as the solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Part 1 from staffer &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;PRE&gt;&lt;CODE class=" language-jsl"&gt;path = "$desktop/temp/";
files = Files In Directory( path );
For( ifile = 1, ifile &amp;lt;= N Items( files ), ifile++,
  filename = files[ifile];
  If( Right( filename, 4 ) == ".jpg",
  pic = Open( path || filename, "jpg" );
  jslcolor = pic &amp;lt;&amp;lt; getpixels();
  {red, green, blue} = Color To RGB( jslcolor );
  {hue, lightness, saturation} = Color To HLS( jslcolor );
  nr = N Rows( jslcolor );
  nc = N Cols( jslcolor );
  dt = New Table( Substr( filename, 1, Length( filename ) - 4 ),
  addrows( nr * nc ),
  New Column( "x" ),
  New Column( "y" ),
  New Column( "red", setvalues( red ) ),
  New Column( "green", setvalues( green ) ),
  New Column( "blue", setvalues( blue ) ),
  New Column( "hue", setvalues( hue ) ),
  New Column( "lightness", setvalues( lightness ) ),
  New Column( "saturation", setvalues( saturation ) ),
  );
  irow = 0;
  For( iy = 1, iy &amp;lt;= nr, iy++,
  For( ix = 1, ix &amp;lt;= nc, ix++,
  irow++;
  dt:y[irow] = iy;
  dt:x[irow] = ix;
  )
  );
  // do something with dt
  Wait( 1 );
  Close( dt, "nosave" );
  );
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Part 2 from staffer &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3977"&gt;@JohnPonte&lt;/a&gt;:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One thing I'll suggest is that you can use NewImage(), instead of Open() for the image file. Open() is a more general function that has to figure out what you are opening. In that process, it uses OS functionality, like opening your image in another program. img = NewImage("filename.jpg"); will open the image file and create a JSL image, returning you the handle to it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other suggestion is that you can use another script I did (before the Image Analyzer) on the File Exchange, called&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.jmp.com/docs/DOC-6100" target="_blank"&gt;ImageToDatatable&lt;/A&gt;. It will convert your image into a data table, similarly to the Image Analyzer, but you won't get all the rest of what the Image Analyzer does.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wrap that in the loop as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;shows (above) and you should be good to go.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 16:28:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-Image-jpg-Files-Perform-Analysis-and-move-onto-next-Image/m-p/48338#M27518</guid>
      <dc:creator>sseligman</dc:creator>
      <dc:date>2017-12-08T16:28:52Z</dc:date>
    </item>
  </channel>
</rss>

