cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Jackie_
Level VI

String to image conversion?

Hi,

I have a table that contains PNG images in some string format (exported using fig.write_image in Python). Is JSL capable of doing an image conversion of a string? 

 

 

2 REPLIES 2
ErraticAttack
Level VI

Re: String to image conversion?

Yes, use Decode64 Blob() function -- it looks like your example is not complete (it looks like your cell values have been truncated), but if you can get the unmodified strings, you can do something like this:

 

Names Default to Here( 1 );
image string = "iVBORw0KGgoAAAANSUhEUgAAALYAAACxCAYAAABp9Ue8AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAATOUAAEzlAXXO8JUAAAM7SURBVHhe7dKxbV0JEENRleeCXI5T1eFWtgxlfxNDEbERPU/ingFONBGB+/bx8fGCNcJmkrCZJGwmCZtJwmaSsJkkbCYJm0nCZpKwmSRsJgmbScJmkrCZJGwmCZtJwmaSsJkkbCYJm0nCZpKwmSRsJgmbScJmkrCZJGwmCZtJwmaSsJkkbCYJm0nCZpKwmSRsJgmbScJmkrCZJGwmCZtJwmaSsJkkbCYJm0nCZpKwmSRsJgmbScJmkrCZJGwmCZtJwmaSsJkkbCYJm0nCZpKwmSRsJgmbScJm0pcK+/39/X8j7adH2A9J++kR9kPSfnqE/ZC0nx5hPyTtp+dbhP329nbgx+vXP6+/cmlT2k+PsD8Je4mwPwl7ibA/CXuJsD8Je8m3CPu/7/frZwj15+8/7y9waVPaT4+wDy5tSvvpEfbBpU1pPz3CPri0Ke2nR9gHlzal/fQI++DSprSfHmEfXNqU9tMj7INLm9J+eoR9cGlT2k+PsA8ubUr76RH2waVNaT89wj64tCntp0fYB5c2pf30CPvg0qa0nx5hH1zalPbTI+yDS5vSfnqEfXBpU9pPj7APLm1K++kR9sGlTWk/PcI+uLQp7adH2AeXNqX99Aj74NKmtJ8eYR9c2pT20yPsg0ub0n56hH1waVPaT4+wDy5tSvvpEfbBpU1pPz3CPri0Ke2nR9gHlzal/fQI++DSprSfHmEfXNqU9tMj7INLm9J+eoR9cGlT2k+PsA8ubUr76RH2waVNaT89wj64tCntp0fYB5c2pf30CPvg0qa0nx5hH1zalPbTI+yDS5vSfnoGwv76lzal/fQI++DSprSfHmEfXNqU9tPzLcJelPbTI+yHpP30CPshaT89wn5I2k+PsB+S9tMj7Iek/fR8qbChRdhMEjaThM0kYTNJ2EwSNpOEzSRhM0nYTBI2k4TNJGEzSdhMEjaThM0kYTNJ2EwSNpOEzSRhM0nYTBI2k4TNJGEzSdhMEjaThM0kYTNJ2EwSNpOEzSRhM0nYTBI2k4TNJGEzSdhMEjaThM0kYTNJ2EwSNpOEzSRhM0nYTBI2k4TNJGEzSdhMEjaThM0kYTNJ2EwSNpOEzaCP17+cw3u7nh/6igAAAABJRU5ErkJggg==";

New Window( "Test",
	New Image( Decode64 Blob( image string ) )
)
Jordan
Craige_Hales
Super User

Re: String to image conversion?

It says "truncated" but it also seems to load as a 3000x3000 all blank image...that compressed really well. Maybe all white, maybe all black. I'm also a little puzzled.

Craige