I'm stuck trying to convert an array of points which represent a drawing(simple 2D black lines) taken from a mobile phone. I pass that array of points to a server which then emails that drawing to another person.
I can't find a way to convert that array of points to an image, png, or something else. And then upload it to an static server so I can insert it in an email and send to the other person.
I'm looking something like canvas on android but on the serverside so I can output an image. Preferably Java, but at this point I would take anything.
An ex of the array of points:
{
"drawing_objects": [
[
{
"x": 177,
"y": 246
},
{
"x": 177,
"y": 246
},
{
"x": 177,
"y": 246
}
],
[
{
"x": 870,
"y": 298
},
{
"x": 866.5316,
"y": 302.62445
}
]
]
}
These are two lines, in a drawing, the first with 3 point, the second one with 2.
If you are using a Java based server, then you could create a Graphics2D, draw the points and then export that to PNG or whatever you want.