使用UPLOADIFY插件上传完成后获取上传图像的宽度

问题描述:

我想在uploadify中完成上传后获取图片的宽度,然后在上传之前使比例与之前的比例相符

I want to get the width of an image when upload complete in uploadify and then make make the proportion correct with the previous one before upload

FOCUS: 获取上传图片的 WIDTH

FOCUS: get the WIDTH of the uploaded image

//当所有文件上传完毕后

//when all files finished uploading

'onAllComplete' : function(event,data) {
      alert("action");
    }

//文件上传时

'onComplete'  : function(event, ID, fileObj, response, data) {
      alert('There are ' + data.fileCount + ' files remaining in the queue.');
    }

尝试

$("#imgID").css("width");

$("#imgID").width()

它看起来像

$('#file_upload').uploadify({
$imgThis=$(this);
alert($imgThis.width());
'onComplete'  : function(event, ID, fileObj, response, data) {

        }
});