I am trying to get image data via user file ulpoad - from JavaScript into Defold using html5_run()
There seems to be a limit(around 2048) for data that is passed back on return.
Is this correct, or is something else going on?
For example, in Defold I use this:
local result = html5.run("upload_file();")
Which gets the image source through JavaScript:
<script type='text/javascript'>
function upload_file() {
var output = document.getElementById('output_image');
return output.src;
};
</script>
And gives me something like this (for a very small icon):
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAC5JREFUGJVjZEAF/xlIBP+ZsAguYGBg4EI3Fh2vwmflfCQTCLrpPyO6ACEdGAAANaMM9wuhrTQAAAAASUVORK5CYII=
For larger images, the data gets truncated and corrupts the image.