title: Jcrop issue if image is resized - Jquery
body: <p>I am using Jquery UI to resize the image. So if is there any image then user can resize the image using the JQuery UI and then I am using JCrop to crop the image. So the problem is when user resizes the image and then crop the image after image resized then for some reason Jcrop picks the original sized image. Is there any way to tell JCrop to pick the resized image dimensions to crop?
  Please see the attached image.</p>
  
  <p><img src="https://i.stack.imgur.com/0TgAd.jpg" alt="enter image description here"></p>
  
  <pre><code>$('img').Jcrop({
      onChange: showPreview,
      onSelect: showPreview,
      setSelect: [100, 100, 50, 50]
  });
  
  function showPreview(c) {
      if (parseInt(c.w) &gt; 0) {
          // Show image preview
          var imageObj = $('img')[0];
          var canvas = $("#preview")[0];
          var context = canvas.getContext("2d");
          context.drawImage(imageObj, c.x, c.y, c.w, c.h, 0, 0, canvas.width, canvas.height);
          cropWidth = c.w;
          cropHeight = c.h;
      }
  }
  </code></pre>
  
  <p>Please check the JsFiddle link <a href="http://jsfiddle.net/mpvPC/106/" rel="nofollow noreferrer">http://jsfiddle.net/mpvPC/106/</a>. As you notice that I have out the width and height on image to get it resized if you remove width and height then it works fine</p>