Choose Language Hide Translation Bar
Highlighted
bdeppa
Level II

Importing Several .jpg files into a Expression Column

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
Highlighted
Craige_Hales
Staff (Retired)

Re: Importing Several .jpg files into a Expression Column

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

View solution in original post

2 REPLIES 2
Highlighted
Craige_Hales
Staff (Retired)

Re: Importing Several .jpg files into a Expression Column

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

View solution in original post

Highlighted
bdeppa
Level II

Re: Importing Several .jpg files into a Expression Column

Thanks, worked like a charm!

Article Labels

    There are no labels assigned to this post.