Skip to content
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

After selecting the photo, the returned base64 string is incomplete #274

Open
Disoc opened this issue Sep 12, 2018 · 0 comments
Open

After selecting the photo, the returned base64 string is incomplete #274

Disoc opened this issue Sep 12, 2018 · 0 comments

Comments

@Disoc
Copy link

Disoc commented Sep 12, 2018

const options: ImagePickerOptions = {
  maximumImagesCount: 1,
  // width: 300,
  height: 350,
  quality: 90,
  outputType: 1
};    

this.imagePicker.getPictures(options).then((results) => {
if (results) {
if (type == 'top') {
for (var i = 0; i < results.length; i++) {
this.imageUrl = 'data:image/jpg;base64,' + results[i];
this.frontImg = results[i];
console.log('Image URI: ' + results[i]);
}
} else {
for (var j = 0; j < results.length; j++) {
this.imageUrlBack = 'data:image/jpg;base64,' + results[j];
this.backImg = results[j];
}
}
}
this.nativeService.hideLoading();
}, (err) => {
this.nativeService.hideLoading();
alert(err);
});

After selecting the photo, the returned base64 string is incomplete,However, I set the height below 200, and the returned base64 string is complete, but the picture is too blurry

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

1 participant