100
rated 0 times
[
105]
[
5]
/ answers: 1 / hits: 6580
/ 10 Years ago, sat, september 6, 2014, 12:00:00
I'm trying to display images with URL.createObjectURL
. However, it takes so much memory, about 10 times of image size.
Here is my code:
var image = new Image();
image.src = URL.createObjectURL(blob);
image.className = 'images';
image.onload = function(){
URL.revokeObjectURL(this.src);
};
$('.images').appendTo('body');
Is this a browser bug? Or something's wrong with my code?
More From » javascript