我在javascript中使用Jcrop,我想获得所选图像文件的高度和宽度。任何人都可以帮助我吗?
function fileSelectHandler_assistant() {
// get selected file
var oFile = $('#ass-photo-file')[0].files[0]
// check for image type (jpg and png are allowed)
var rFilter = /^(image\/jpeg|image\/png)$/i;
if (!rFilter.test(oFile.type)) {
$('.error').html('<button id="crop_alert_message_button" type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button><i class="fa fa-exclamation"></i> Please select a valid image file (jpg and png are allowed).').show();
return;
}
}