Skip to content

takePicture() with specified width/height not working #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DivyeshSharma opened this issue Aug 29, 2017 · 2 comments
Closed

takePicture() with specified width/height not working #55

DivyeshSharma opened this issue Aug 29, 2017 · 2 comments

Comments

@DivyeshSharma
Copy link

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

  1. Is there any 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 but did not able find it.

  2. As an alternative we have tried nativescript-camera plugin (version 3.0.0) that has feature to automatically crop the image based on defined height and width as below:

     takePicture({ width: 300, height: 300, keepAspectRatio: false, saveToGallery: true }).
     then((imageAsset) => {
     	let image = new Image();
     	image.src = imageAsset;
     },
     (err) => {
     	console.log("Error -> " + err.message);
     });
    

But here we did not get image with specified height and width (in saved image in gallery OR in imageAsset object). It is always returning actual image.
I am little bit stuck over here and wondering why such a basic image manipulation functionality is not working in native script.

Please reply if anyone has any solution.

@echap
Copy link

echap commented Sep 6, 2017

Same here, and it's been like six month... Would be great to have updates on this :)

@tsonevn
Copy link
Contributor

tsonevn commented Sep 27, 2017

Hi @DivyeshSharma, @echap
Indeed this is an old issue which is already reported here . This problem is still under review, however, I could not commit to the exact time when it would be fixed. Regarding that, I would suggest to follow the another issue and to verify, whether the given workarounds are applicable in your case.

@tsonevn tsonevn closed this as completed Sep 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants