This is a migrated thread and some comments may be shown as answers.

Crop image taken via camera

3 Answers 151 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
ruchin
Top achievements
Rank 1
ruchin asked on 25 Sep 2015, 11:12 AM

Hi,

I am developing an app where in i'm required to capture a photo using the device camera.I am able to do this successfully using navigator.camera.getPicture.

However I also want to allow the user to crop the image after the photo has been captured.Is it possible to crop the image so that I get a square image regardless of whether the image was shot in landscape or portrait mode?

Is something like this possible?? "https://www.youtube.com/watch?v=cSGFiP-gZYU&feature=youtu.be"

Is there a plugin to crop an image or to force the user to capture a square image?

Can u pls guide me on how to achieve this functionality

Regards,

Ruchin Dayal.

3 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 30 Sep 2015, 07:08 AM
Hello Ruchin,

You can find a similar question replied in the following forum thread:
Cropping an image on a phone app

Regards,
Tsvetina
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
ruchin
Top achievements
Rank 1
answered on 07 Oct 2015, 04:17 AM

Hi

Thank you very much for the reply.The plugin mentioned in your post does crop the image after it is displayed.Is it possible to crop the image after a photo is clicked using device camera but before the OK button is clicked?

I wanted to achieve the following:-

Photo clicked => Crop Image  => Click OK button  => Display the cropped image.

Any help would be greatly appreciated​.

Thanks

Ruchin Dayal

0
Tsvetina
Telerik team
answered on 09 Oct 2015, 02:10 PM
Hello Ruchin,

In such case, I think using a JavaScript library should be the best approach. It seems like the API offered by the one I linked to in my other post (jquery-cropbox) will allow you to achive the workflow you described.

Regards,
Tsvetina
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
General Discussion
Asked by
ruchin
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
ruchin
Top achievements
Rank 1
Share this question
or