scottcheng / cropit

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

Saved image size depends on 'image-preview' size #199

Closed PLAYCUBE closed 8 years ago

PLAYCUBE commented 8 years ago

Hello guys! First time writing in github.

I am playing a little bit with this cool tool around, and it works really nice! The only thing that bothers me at the moment is, that the image I export as an image file is as large as I set the image preview file size, for example: .cropit-preview { width: 360px; height: 360px; } - my image file will also have the pixel size.

Since I want the preview window to be relatively small (360x360px), I get a low quality image (just 360x360px). Is there a way to set up a smaller window size while keeping a good quality image file at exportation?

Thanks in advance!

PLAYCUBE commented 8 years ago

I've got it by using 'exportzoom':

$('.export1').click(function() {
var imageData1 = $('#image-cropper').cropit('exportZoom', 2.5);
imageData1 = $('#image-cropper').cropit('export');