Croppie: [SOLVED] Export image certain width and height

Created on 23 Mar 2016  路  11Comments  路  Source: Foliotek/Croppie

Hello,

I have a query, I am wanting to export to a resolution of 1500x500 an image of 2000x2000. The problem is that the viewport of that size would not go into some resolutions.

Any ideas ?

thank you very much

regards

Most helpful comment

Is there anyway you can grab the latest from master and test using that code? https://github.com/Foliotek/Croppie/blob/master/croppie.js

I made a few changes last night that might affect this.

All 11 comments

Hey, it's not documented yet, but just last week someone submitted a PR to add this functionality.

101 Added this functionality. I would follow the sample code in that case and it should help.

We'll try to add this to the documentation soon.

Hi thedustinsmith,

I just tried what you said but without any result. my initialization is as follows

var uploadCropProfile = cropperPortada.croppie({
viewport: {
width: 128,
height: 128
},
boundary: {
width: 400,
height: 150
}
});

And the function bind result is the next :

cropperPortada.croppie('result', {
type : 'canvas',
format : 'jpeg',
quality: '0.9',
size: {
width: 1500,
height: 500
}
});

I'm uploading an image of a resolution of 1280x720 and 1500x500 want to export it

Thanks

What do you mean by "without any result"?

If you can throw together a jsbin/jsfiddle I might be able to help you out a little more.

i can't export image with custom size. I upload an image of 2000x200 and the viewport is 400x200 and i like export the image of 1500x500

What happens when you call result() with those parameters? Can you log out the response of result and send it this way?

Or better yet, throw together an example that we can see.

When I get the results of the exported image rather than of 1500x500 it is 100x100

cropperPortada.croppie('result', {
type : 'canvas',
format : 'jpeg',
quality: '0.9',
size: {
width: 1500,
height: 500
}
});

What version of croppie are you using?

i use version 2.0.2. Sorry for my english

Is there anyway you can grab the latest from master and test using that code? https://github.com/Foliotek/Croppie/blob/master/croppie.js

I made a few changes last night that might affect this.

Wooooooooooooooooooooooooooooooooooooooo, amazing.

Very very thankssssss :D

Glad it worked!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tpilitis picture tpilitis  路  5Comments

AliekseiDev picture AliekseiDev  路  7Comments

TheAustinG picture TheAustinG  路  4Comments

VADS picture VADS  路  5Comments

cannond13 picture cannond13  路  6Comments