okland / camera-ui

Meteor package for taking photos with user interface, one function call on desktop and mobile. Allows to choose between camera to photoLibrary on mobile.
28 stars 12 forks source link

A way to crop photos to square proportions #4

Open dvmorris opened 8 years ago

dvmorris commented 8 years ago

Is there a way to automatically crop images to a square when using this library? My photos are coming back rectangular, and when I stick them in a square space in a template, they are being squeezed in one direction or the other. I'm new to Meteor, so perhaps there is a better way to handle this, but I thought this would be a good place to ask. Thanks for your help!

MennaMa commented 7 years ago

No Worry. You need to use Resizer after your meteor camera as your callback Resizer.resize(data, {width: 400, height: 300, cropSquare: true}, function(err, file) { processImage(file,function(data) { //your code }); });

dineshsdm commented 7 years ago

When i do this, it is not resize the image properly on android device.