scottcheng / cropit

A "customizable crop and zoom" jQuery plugin.
http://scottcheng.github.io/cropit/
MIT License
874 stars 307 forks source link

crop to relative size, not preview size, if image is small, no need to zoom forcefully. When using originalSize the aspectc ratio is lost after cropping. #270

Open ArunEdathadan opened 6 years ago

ArunEdathadan commented 6 years ago

currently using

$(function () { $('.image-editor').cropit({ smallImage: 'allow', imageBackground: true, imageBackgroundBorderWidth: 15, imageBackgroundBorderHeight: 15, exportZoom: 3//, //quality: 0.5 }); });

to export

function CropThis() {
    var imageData = $('.image-editor').cropit('export', {
        type: 'image/jpeg'//,
        //quality: 0.33
        //originalSize: true,
        //exportZoom: 3
    });

    $('.hidden-image-data').val(imageData);

} this scales the image event if the image is small, which is what i want to avoid