Create image from SQL text

I would like to generate an image from a text string stored in the SQL database.

We are currently doing it with another application, but I would like to migrate that into Perspective.
This is one example. Each cell represents one position from the stored value.
i.e. 1=blue
4= purple

So, How could I do that? I have not seen this question in any thread, and with the default tools I am not able to represent it.
The strings's lenght are not always the same.

Thank you!
Thank you!

Does it have to be an image? The example you posted looks like a table with equal sized rows/columns and background cell color configured based on data from your db. Could that work?

Also you should post an example of the data in your database. Does your data record the coordinates with the color or is your data literally just a string like blue,blue,blue,green,...

Probably a heatmap would do.

1 Like

this might be usefull too

I forgot about that one. I write a lot of stuff I forget about. lol.

I think we'll need a bit more information on what the output is supposed to look like with variable length input.


took me a while to find it back, i bookmark to much stuff without adding any tittles to it xd


No matter what output is, but I need to get the colour map somehow, not necessary an image.
This is an example of the stored string:

The underscore repreents blue, and the numbers the colour of the data.

Which one of the two solutions could be better for this application?
Heatmap or Pypng library?