| Products |
| Signals Inventa, Vitro Vivo, Signals Spotfire |
Keywords: Base64, PNG, Image Visualization, Base64Decode, Spotfire Expression, Data Rendering
Description:
This article explains how to convert a Base64 encoded string into an image (PNG) directly within Spotfire. In many cases, image data such as assay results, microscopy images, or chemical structures are stored in Base64 format within data tables. Using Spotfire expressions, you can easily decode and visualize these images in Spotfire visualizations.
Resolution:
Follow the steps below to convert Base64 encoded image strings to PNG format and render them in Spotfire:
- Open your data table that contains the Base64 encoded column (e.g.,
[Base64]). Create a new calculated column using the following expression:
Base64Decode([Base64])
- Once the calculated column is created, add it to your visualization (such as Table or Cross Table).
- Change the rendering mode of the new column to Image:
- Right-click the column header → Select Properties
- Go to Formatting tab → Under Render as, select Image
- The Base64 encoded strings will now display as PNG images within the visualization.
Example:
If your data table has a column named Base64 containing encoded image data, the calculated column expression will be:
Base64Decode([Base64])
You can then use this column to display decoded images directly in a Table visualization.
Note:
Ensure that your Base64 string represents a valid image format (PNG or JPEG). The Base64Decode() function automatically detects image formats and displays them appropriately.
Please find the attached dashboard for reference.
Comments
0 comments
Please sign in to leave a comment.