Image Cropping plugin


#1

We want to allow our user to take selfies in our app which we have built in Nativescript 3.1.2 (tns-core-modules 3.1.0, tns-android 3.1.1).

Is there any telerik nativescript plugin available that allows user to crop an image where user can select the area on a screen which he wants to crop? We tried searching could not find it.


#2

The built-in image galleries on both Android and iOS have Edit functionalities, which include image cropping and rotation, why not delegate the work to those?


#3

Hello Pete,

Thanks for your prompt reply. But I could not get how the built-in image galleries can help here. May be I could not explain my functionality properly. Let me try again.

In our app, there is a screen where user can take his/her selfie. We are showing the captured selfie in a screen. In that screen, we want to give cropping functionality. We have written following code to capture a picture using nativescript-camera plugin (version 3.0.0)

takePicture({ width: 300, height: 300, keepAspectRatio: false, saveToGallery: true }).

        then((imageAsset) => {
            let image = new Image();
            image.src = imageAsset;},
        (err) => {
            console.log("Error -> " + err.message);
        });

Can you please suggest a solution in my case?

Thanks in advanceā€¦