Croppie: Set viewport type to circle, but get square output

Created on 13 Jul 2016  路  6Comments  路  Source: Foliotek/Croppie

Is there a way to set the initial viewport to display as a circle but when getting the result, have it produce a square version of the image?

Most helpful comment

Yep - but I don't think it's documented. https://github.com/Foliotek/Croppie/blob/master/croppie.js#L1050

$('#my-crop').croppie('result', { circle: false, type: 'canvas' });

All 6 comments

Yep - but I don't think it's documented. https://github.com/Foliotek/Croppie/blob/master/croppie.js#L1050

$('#my-crop').croppie('result', { circle: false, type: 'canvas' });

Amazing! You just made my day @thedustinsmith.

Perfect just what I needed. Thank you @thedustinsmith

Thanks

Thank you Dustin, this helped me a lot!

Hi,
I have tried using the following :
$('#my-crop').croppie('result', { circle: false, type: 'blob' });
Seems like circle false is ignored when using type blob. Am I missing something?
Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nicolacardi picture nicolacardi  路  4Comments

VADS picture VADS  路  5Comments

cannond13 picture cannond13  路  6Comments

guschnwg picture guschnwg  路  4Comments

mustkem picture mustkem  路  7Comments