Crop image taken via camera

4 posts, 0 answers
  1. ruchin
    ruchin avatar
    33 posts
    Member since:
    Jun 2015

    Posted 25 Sep 2015 Link to this post

    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.

  2. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 30 Sep 2015 Link to this post

    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.

     
  3. ruchin
    ruchin avatar
    33 posts
    Member since:
    Jun 2015

    Posted 06 Oct 2015 in reply to Tsvetina Link to this post

    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

  4. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 09 Oct 2015 Link to this post

    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.

     
Back to Top