html - JavaScript: Get image dimensions -


i have url image. need determine height , width of image using javascript. image cannot visible user on page. how can dimensions?

var img = new image();  img.onload = function(){   var height = img.height;   var width = img.width;    // code here use dimensions }  img.src = url; 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -