}, RoboCrop.prototype.apply = function (e) {
$("html,body,#crop-editor").css("overflow", "initial"), this.busy(!0)
var t = $(this.imageElement).data("ext")
t = this.validExtension(t ? t : "png")
var i = void 0 === e ? this.getImageBase64(t) : e,
o = i.substring(11, i.indexOf(";base64"))
function dataURLtoBlob(dataurl) {
var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1],
bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
while (n--) {
u8arr[n] = bstr.charCodeAt(n);
}
return new Blob([u8arr], { type: mime });
}
var theblob = dataURLtoBlob(i);
var fd = new FormData();
fd.append('data', theblob);
$.ajax({
method: 'POST',
url: 'saveblobimg.php',
data: fd,
processData: false,
contentType: false,
success: function (output) {
console.log(output);
// $("#output").html(output);
}
});
t = "png" === o ? o : $(this.imageElement).data("ext"), $(this.imageElement).find("img").first().attr("src", i)
var r = $(this.imageElement).data("name")
r = void 0 === r ? "crop_image" : r, $(this.imageElement).find("input[type=hidden]").length || $(this.imageElement).append('<input type="hidden" name="' + r + '" value=""/>'), $(this.imageElement).find("input[type=hidden]").val(i)
var a = ($(this.imageElement).data("upload"), this.getImageSize(), "data:image/png;base64,")
Math.round(3 * (i.length - a.length) / 4)
this.clearImage(), this.busy(!1), $(this.imageElement).addClass("not-empty")
}