title: Get width and height of an image loaded via a FileReader
body: <p>I have an image that is created via a <code>FileReader</code>:</p>
  
  <pre><code>    var fileReader = new FileReader();
      var deferred = $.Deferred();
  
      fileReader.onload = function(event) {
          deferred.resolve(event.target.result);
      };
  
      fileReader.onerror = function() {
          deferred.reject(this);
      };
  
      fileReader.readAsDataURL(file);
  
      return deferred.promise();
  </code></pre>
  
  <p>This returns a base64 encoded string which I use with:</p>
  
  <pre><code>var img = $('&lt;img src="' + fileB64 + '"&gt;');
  </code></pre>
  
  <p>Then this is added to my page.</p>
  
  <p>I wish to get the original height and width of that image.</p>
  
  <p>I can get the size of it on the page via:</p>
  
  <pre><code>this.img = img;
  this.imgWidth = this.img.width();
  this.imgHeight = this.img.height();
  </code></pre>
  
  <p>But I wish to get its original width and height.</p>