/home/mip/mip/public/template/AdminLTE/plugins/cropper-master/examples/crop-on-canvas.html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title>Cropper</title>
  <link rel="stylesheet" href="../dist/cropper.css">
  <style>
    .container {
      max-width: 640px;
      margin: 20px auto;
    }

    img {
      max-width: 100%;
    }
  </style>
</head>
<body>

  <div class="container">
    <h1>Crop on canvas with Cropper</h1>
    <h3>Image</h3>
    <div>
      <img id="image" src="../docs/images/picture.jpg" alt="Picture">
    </div>
    <h3>Canvas</h3>
    <div>
      <canvas id="canvas"></canvas>
    </div>
  </div>

  <!-- Scripts -->
  <script src="https://code.jquery.com/jquery-3.1.1.slim.min.js"></script>
  <script src="../dist/cropper.js"></script>
  <script>
    $(function () {
      var $canvas = $('#canvas');
      var $image = $('#image');
      var image = $image[0];

      function start() {
        var width = $(this).width();
        var height = $(this).height();
        var canvas = $canvas[0];
        var cropper;

        canvas.width = width;
        canvas.height = height;
        canvas.getContext('2d').drawImage(
          this,
          0, 0, this.naturalWidth, this.naturalHeight,
          0, 0, width, height
        );

        $canvas.cropper();
      }

      if (image.complete) {
        start.call(image);
      } else {
        $image.one('load', start);
      }
    });
  </script>
</body>
</html>