does anyone know if it's possible to synchronously create an image object from a data uri using JavaScript? It is possible to create an image object from a data URI asynchronously like this:
imageObj = new Image();
imageObj.onload = function() {
callback(imageObj);
};
imageObj.src = dataURI;
You might think that this would work:
imageObj = new Image();
imageObj.src = dataURI;
callback(imageObj);
But if I remember correctly, this fails in some browsers.
Ideas?