I'm adding an image snapshot of a webcam to a div using jquery (2.1.3)
Why does this not work:
var image = new Image();
image.src = "data:image/jpg;base64," + data;
image.width = "320px";
image.height = "240px";
$("#video").html(image);
The image tag has sizes 0 for w and h;
This does work
var image = $("<img>", {
"src": "data:image/jpg;base64," + data,
"width": "640px", "height": "480px"});
$("#video").html(image);