Subscribe Bookmark RSS Feed

Importing Several .jpg files into a Expression Column

bdeppa

Community Trekker

Joined:

Sep 17, 2014

I have 200 .jpg images that I would like to read into a single expression column in JMP.  They all reside in the same folder on my hard drive.  I am looking to read them into two columns one containing the image and one containing the names (1a, 1b, etc.)   Image samples below:

12948_pastedImage_0.png

I assume I would need to write a script to do this, any one have experience with this?

Thanks in advance,

Brant Deppa

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

path = "$desktop/gfx/";

pics = filesindirectory(path);

New Table( "Untitled",

  Add Rows( 0 ),

  New Column( "name",

  character,

  Set Values( pics )

  ),

  New Column( "image", Expression, "None", Set Values( {} ) )

);

foreachrow(

  :image = newimage(path||:name)

);



12939_pastedImage_2.png

Craige
2 REPLIES
Solution

path = "$desktop/gfx/";

pics = filesindirectory(path);

New Table( "Untitled",

  Add Rows( 0 ),

  New Column( "name",

  character,

  Set Values( pics )

  ),

  New Column( "image", Expression, "None", Set Values( {} ) )

);

foreachrow(

  :image = newimage(path||:name)

);



12939_pastedImage_2.png

Craige
bdeppa

Community Trekker

Joined:

Sep 17, 2014

Thanks, worked like a charm!