在离子照相机中添加正方形

时间:2019-05-03 07:47:05

标签: angular ionic-framework camera

当我要拍照时,是否可以在QR扫描仪中添加方格?

a busy cat

我的代码:

    options = {
      quality: 70,
      targetWidth: 200,
      targetHeight: 300,
      destinationType: this.camera.DestinationType.FILE_URI,
      encodingType: this.camera.EncodingType.JPEG,
      mediaType: this.camera.MediaType.PICTURE
    }

      this.camera.getPicture(options).then((imageData) => {
      this.loading = false;
      this.imagen64 = imageData;
      let filename = imageData.substring(imageData.lastIndexOf('/')+1);
      let path =  imageData.substring(0,imageData.lastIndexOf('/')+1);
      this.file.readAsDataURL(path, filename).then(res=> this.safeUrl = res  );
  }, (err) => {
    this.loading = false;
      alert(err);
  });

0 个答案:

没有答案