Is there a way to convert an image type in a jmp script prior to adding it in an image column in a table? I have a bunch of .tif files which reside in a .zip file. I can read the data from a specific image into a table using a script like this:
dt = New Table( "test", New Column( "Image", Expression ) );
dt << Add Rows( 1 );
za = Open( "tif_library", "zip" );
dat = za << Read( "tif_file_n.tif", Format( blob ) );
img = New Image( dat, "tiff" );
dt:Image = img;
Close( dt, Save("test.jmp", "jmp");
Problem is that the file test.jmp is huge. However, if I can convert the image from a tiff to a jpeg, the resulting jmp table is considerably smaller (and I can live with the quality limitations). But the only way I can see to do this is to save the image as a .jpg file, and then read it back in.
dt = New Table( "test", New Column( "Image", Expression ) );
dt << Add Rows( 1 );
za = Open( "tif_library", "zip" );
dat = za << Read( "tif_file_n.tif", Format( blob ) );
img = New Image( dat, "tiff" );
img << Save Image( "temp.jpg", "jpeg");
img1 = New Image( "temp.jpg" );
dt:Image = img1;
Close( dt, Save("test.jmp", "jmp");
Is there a simple way to do this in JMP without having to write to file and read it back in? Thank you for your sage advice!