To image (image)
Description
Converts a Base64 string into an image.
How does it work in the search window?
Select Create column in the search window toolbar, then select the To image operation. You need to specify one argument:
Argument | Data type | More Info |
---|---|---|
String to convert mandatory | string | The string values specified must always be preceded by the pattern → extension;base64;string (where extension is a file format such png or jpg, base64 is a fixed expression and string is the code of the image). An example would be → png;base64;4AAQskZg... If you have a picture and want to know the code, you can use an encoder such as the one you can find in the following link. Be aware that in some encoders the pattern preceding the code might not be exactly the same as the required by Devo so you need to make sure it coincides. Be aware that there is a limited size for the picture, ideally designed for company logos. |
The data type of the values in the new column is image.
Example
We have this base64 string and we want to display the corresponding image in our data table. To do it, click Create column and select the To Image operation. The arguments needed are:
String to convert -Â png;base64;code_of_the_image
Click Create column and you will see the following result:
How does it work in LINQ?
Use the operator select
... as
... and add the operation syntax to create the new column. This is the syntax of the To image operation:
image(base64_string)
Example
You can copy the following LINQ script and try the above example on the demo.ecommerce.data
table.Â
from demo.ecommerce.data
select image("png;base64;iVBORw0KGgoAAAANSUhEUgAAAMgAAABWCAIAAAAFVk76AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAArQSURBVHhe7dsPTJNnHgfwdzKHivjv2E6z15rA9KjDWcYCjRMImd1UOg6K5pCxYLPcwH8lXoRpgLuchYtp5Vy5nKJTKwmC8Wx3B2VBamKsmSlEdnVy1gsHuWHNoXaA16l7p+i95X2079u+bd/aPgi53yck/J7XtuTl/fL8e19fevLkCQFApE1D3wGIKAgWwAKCBbCAYAEsIFgACwgWwAKCBbCAYAEsIFgACwgWwAKCBbAQeq9QLBajCvx/s9vtqAoIeiyABQQLYAHBAlhAsAAWECyABQQLYAHBAlhAsAAWECyABQQLYAHBAlhAsAAWECyABQQLYAHBAlhAsAAWECyAxWR5gjQxMXHPnj1RUVH79u3r7e1FRwli48fO7LzhGTMfP/zpJXTIx/RXnly2zj72p4Ujwy+jQyApQ74qMzNhDtOihv5+4ZLF3OVgmuEQ+ATpZAlW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