Dim canvasElem As BANanoElement = body.Append($"<canvas id="myCanvas"></canvas>"$).Get("#myCanvas")
Dim canvasObj As BANanoObject = canvasElem.ToObject.RunMethod("getContext", "2d")
Dim fetch As BANanoFetch
Dim fetchResponse As BANanoFetchResponse
Dim blob As BANanoObject
Dim bitmap As BANanoObject
fetch.Initialize("./assets/banano.jpg",Null)
fetch.Then(fetchResponse)
Return fetchResponse.Blob
fetch.Then(blob)
Dim CreateBitmap As BANanoObject
CreateBitmap.Initialize("createImageBitmap")
Return CreateBitmap.Execute(Array(blob,0, 0, 64, 64)) ' crop from top left, 64 pixels width en height
fetch.Then(bitmap)
canvasObj.RunMethod("drawImage", Array(bitmap,0,0))
Dim data As String = canvasElem.ToObject.RunMethod("toDataURL", Null).Result
' and then upload this base64 data back to your server and save it there to a file
...
fetch.End