title: jQuery fengyuanchen cropper plugin - getImageData() cannot get width/height
body: <p>I am using <a href="https://github.com/fengyuanchen/cropper" rel="nofollow">fengyuanchen jQuery cropper</a></p>
  
  <p>I have the cropper set to be responsive. This means that the displayed width/height of the image being cropped may not be the true native width/height. I need to get the displayed width/height so that I can calculate where to crop the original full-size image when applicable. </p>
  
  <p>I read this example in <a href="https://github.com/fengyuanchen/cropper" rel="nofollow">the docs</a>:</p>
  
  <pre><code>var imageData = $().cropper('getImageData');
  </code></pre>
  
  <p>However, <code>console.log(imageData);</code> returns this:</p>
  
  <pre><code>&gt; n.fn.init {}
      &gt; __proto__ : Object[0]
          /* Inside this is every custom defined js function */
  </code></pre>
  
  <p>If anyone has experience with this it would be a major help.</p>
  
  <p><strong>For anyone else with this issue</strong>:
  I'm currently just grabbing the <code>.width()</code> of the <code>.cropper-canvas</code> object like this, but I would still appreciate if someone knew how to use the method properly.</p>
  
  <pre><code>var cropperCanvas = $('.cropper-canvas');
  console.log('Width: '+cropperCanvas.width()+"\nHeight:"+cropperCanvas.height());
  </code></pre>