I wrote below code to send edited image to server:
$('#btn-save-image').on('click', function (e) {
var blob = imageEditor.toDataURL();
var formData = new FormData();
formData.append('base64Image', blob);
$.ajax({
url: '@Url.Action("SaveEditedImage")', // upload url
type: "POST",
data: formData,
processData: false,
contentType:false,
success: function (data) {
showmessage(data);
},
error: function () {
alert('UPLOAD FAILED, PLEASE TRY AGAIN...');
},
complete: function () {
showLoading(false);
}
});
return false;
});
But this code send image with zoom, in the other word toDataUrl cropped my image to zoomed area. But I need to send entire image to server.
Is this a bug or there is something that I don't know?
todataurl only send 150 * 300 image I also want to send entire image
@mbasirati @Al-hamed-Mohammed
Do you want to try the 'resetZoom' API?
@mbasirati @Al-hamed-Mohammed
Do you want to try the 'resetZoom' API?
Thank you. I used resetZoom before saving and my problem solved. :)
Most helpful comment
@mbasirati @Al-hamed-Mohammed
Do you want to try the 'resetZoom' API?