function readImage(inputFiles,$input){
if(inputFiles == undefined || inputFiles.length == 0) return;
var inputFile = inputFiles[0];
var reader = new FileReader();
reader.readAsDataURL(inputFile);
reader.onload = function(event) {
$input.attr("src", event.target.result);
var image = new Image();
image.src = event.target.result;
image.onload = function() {
console.log('height: ' + this.height); ** <=== this * **
console.log('width: ' + this.width); ** <=== and this * **
};
};
}
function readImage(inputFiles,$input){