- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How to use JSL to restore a picture binary to a picture in a table?
The image binary file is downloaded from the web using JSL in the format of.
I tried the following JSL, which cannot be loaded as a picture in the table.
rs=New HTTP Request(URL(u),Method("GET"),Headers(h));
rr=rs<<Send;
img="New Image(Char To Blob("||rr||"base64compressed\!"),\!"png\!")";
dt=New Table("kk",Add Rows(1),New Column("A", Expression),New Column("B", Expression),New Column("C", Expression));
dt[1,1]=img;
I have attached the results of this binary file.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
回复: How to use JSL to restore a picture binary to a picture in a table?
u = "https://community.jmp.com/t5/image/serverpage/image-id/47607iC302B97FB4C8A9DF/image-size/large?v=v2&px=999";
rs=New HTTP Request(URL(u),Method("GET"));
rr=rs<<Send;
img=open(rr,"PNG");
dt=New Table("kk",Add Rows(1),New Column("A", Expression),New Column("B", Expression),New Column("C", Expression));
dt[1,1]=img;
If you don't need the httprequest, open can fetch the url directly. Above, httprequest fetched a BLOB from the server and open accepts the BLOB in place of a file name; open needs the explicit file type since the BLOB does not know the extension.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
回复: How to use JSL to restore a picture binary to a picture in a table?
Use browser to download the image and save it to a local file. Then load it with JMP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
回复: How to use JSL to restore a picture binary to a picture in a table?
Does it indicate that this binary requires further conversion?
txt=Decode64 Blob(rr);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
回复: How to use JSL to restore a picture binary to a picture in a table?
u = "https://community.jmp.com/t5/image/serverpage/image-id/47607iC302B97FB4C8A9DF/image-size/large?v=v2&px=999";
rs=New HTTP Request(URL(u),Method("GET"));
rr=rs<<Send;
img=open(rr,"PNG");
dt=New Table("kk",Add Rows(1),New Column("A", Expression),New Column("B", Expression),New Column("C", Expression));
dt[1,1]=img;
If you don't need the httprequest, open can fetch the url directly. Above, httprequest fetched a BLOB from the server and open accepts the BLOB in place of a file name; open needs the explicit file type since the BLOB does not know the extension.