1
私のionic2アプリでカメラを使用しようとしています。ionic2カメラ画像テンプレート全体に画像が表示されない
takePicture(){
Camera.getPicture({
sourceType: Camera.PictureSourceType.CAMERA,
destinationType: Camera.DestinationType.FILE_URI,
quality: 100,
targetWidth: 1000,
targetHeight: 1000,
correctOrientation: true
}).then((imageData) => {
// imageData is a base64 encoded string
this.base64Image = imageData;
}, (err) => {
console.log(err);
});
}
をし、次のHTMLでそれを表示します:私は次の関数と一緒に写真を撮る
<img [src]="base64Image" *ngIf="base64Image" text="{{flavour}}" draw-text crossOrigin style="max-width: : 100%; max-height: 100%;" />
が、それは私がHTMLでカメラから取った完全な画像を表示されませんが。
![enter image description here](https://i.stack.imgur.com/KqbG0.png)
![enter image description here](https://i.stack.imgur.com/De5L1.jpg)
なぜこの違いがある 以下はスクリーンショットですか?私が撮った完全な画像をどのように表示できますか?
注:私は変更targetWidth値を試してみましたが、それはディレクティブは、私が撮影した画像にオーバーレイとしてテキストを追加するために使用していますので、それがあった