Take the tour ×  I use a fileReference.browse() to select an
image file from the harddrive.  How can I check the Width and
Height of the selected image file please?  Thank you!
share|improve this question add comment  3 Answers  up vote 8
down vote accepted  Load the fileReference.data into a Loader
using loadBytes(). Then you'll have: sourceBMP:Bitmap =
loader.content as Bitmap;  Here is a sample code:  MXML part:
<net:FileReference id="fileReference"
complete="fileReference_complete(event);" /> <s:Button
id="uplaodImageBtn"     label="Upload Image"  AS3 part:  private
function uplaodImageBtn_clickHandler() : void {     var
arr:Array = [];  private function
fileReference_select(evt:Event):void {  private function
fileReference_complete(event:Event):void {     var loader:Loader
= new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
loader_complete);  public function loader_complete (event:Event)
: void {     var sourceBMP:Bitmap =
event.currentTarget.loader.content as Bitm