mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Fix build
This commit is contained in:
@@ -271,6 +271,27 @@ export class NewPublicationPage implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getPicture() {
|
||||||
|
const options: CameraOptions = {
|
||||||
|
quality: 90,
|
||||||
|
sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
|
||||||
|
destinationType: this.camera.DestinationType.DATA_URL,
|
||||||
|
encodingType: this.camera.EncodingType.JPEG,
|
||||||
|
mediaType: this.camera.MediaType.PICTURE,
|
||||||
|
targetWidth: 720,
|
||||||
|
targetHeight: 720,
|
||||||
|
}
|
||||||
|
|
||||||
|
this.camera.getPicture(options).then((imageData) => {
|
||||||
|
// imageData is either a base64 encoded string or a file URI
|
||||||
|
// If it's base64 (DATA_URL):
|
||||||
|
let base64Image = 'data:image/jpeg;base64,' + imageData;
|
||||||
|
this.capturedImage = imageData;
|
||||||
|
this.capturedImageTitle = new Date().getTime() + '.jpeg';
|
||||||
|
}, (err) => {
|
||||||
|
/* console.log(err); */
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
close(){
|
close(){
|
||||||
this.goBack();
|
this.goBack();
|
||||||
|
|||||||
Reference in New Issue
Block a user