Edit D:\rfid\apache-tomcat-8.5.32\webapps\libsystem\third-party\cropper-master\js\main.js
$(function () { 'use strict'; var console = window.console || { log: function () {} }; var URL = window.URL || window.webkitURL; var $image = $('#image'); var $dataHeight = $('#dataHeight'); var $dataWidth = $('#dataWidth'); var options = { aspectRatio: 'NaN', minContainerWidth: 900, //??????????? minContainerHeight: 500, //??????????? crop: function (e) { $dataHeight.val(Math.round(e.detail.height)); $dataWidth.val(Math.round(e.detail.width)); } }; var originalImageURL = $image.attr('src'); var uploadedImageName = 'cropped.jpg'; var uploadedImageType = 'image/jpeg'; var uploadedImageURL; // Cropper $image.on({ /* ready: function (e) { console.log(e.type); }, cropstart: function (e) { console.log(e.type, e.detail.action); }, cropmove: function (e) { console.log(e.type, e.detail.action); }, cropend: function (e) { console.log(e.type, e.detail.action); }, crop: function (e) { console.log(e.type); }, zoom: function (e) { console.log(e.type, e.detail.ratio); }*/ }).cropper(options); // Import image var $inputImage = $('#inputImage'); if (URL) { $inputImage.change(function () { var files = this.files; var file; if (!$image.data('cropper')) { return; } if (files && files.length) { file = files[0]; if (/^image\/\w+$/.test(file.type)) { uploadedImageName = file.name; uploadedImageType = file.type; if (uploadedImageURL) { URL.revokeObjectURL(uploadedImageURL); } uploadedImageURL = URL.createObjectURL(file); $image.cropper('destroy').attr('src', uploadedImageURL).cropper(options); $inputImage.val(''); } else { window.alert('Please choose an image file.'); } } }); } else { $inputImage.prop('disabled', true).parent().addClass('disabled'); } $("#getCroppedCanvas").on("click", function () { console.log($image.cropper('getCroppedCanvas'));; var cas=$image.cropper('getCroppedCanvas', { width: 180, height: 180, minWidth: 180, minHeight: 180, maxWidth: 4096, maxHeight: 4096, fillColor: '#fff', imageSmoothingEnabled: false, imageSmoothingQuality: 'high', }); var base64url=cas.toDataURL('image/jpeg'); $("#photourl").attr("src",base64url); vBase64Image = 1; getCroppedCanvasResult(); //$('.cavans').html(cas) //??ody?????anvas??? }) }); function getCroppedCanvasResult(){ }
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de