Foliotek / Croppie

A Javascript Image Cropper
http://foliotek.github.io/Croppie
MIT License
2.55k stars 886 forks source link

Crop image stretched #773

Open giuliastully opened 2 years ago

giuliastully commented 2 years ago

After the crop the image is stretched, it does not maintain the aspect ratio.

I use this:

$image_crop = $("#cover_image").croppie({
        enableExif: true,
        enableOrientation: true,
        viewport: {
            width: 360,
            height: 270,
            type: "square" //circle
        },

        boundary: {
            width: 360,
            height: 270
        }

    });

    $image_crop
            .croppie("result", {
                type: "canvas",
                size: 'original',
                circle: 'false',
            })