title: How to resize image in Ionic 3 without quality reduce and target width and height?
body: <p>I want to reduce the size of images taken by camera API but quality reduce is not good. The best thing is to reduce resolution but I don't want to use target width and height for all images.  </p>
  
  <p>For example, I want image width be 1280 and image height change automatically by its ratio, but in API I should use exact width and height.  </p>
  
  <p>How can I change height dynamic by image ratio???</p>
  
  <p>For now, I use this code:</p>
  
  <pre><code> this.camera.getPicture({
    quality: 60,
    destinationType: this.camera.DestinationType.FILE_URI,
    sourceType: sourceType,
    mediaType: this.camera.MediaType.PICTURE,
    targetWidth: 1280,
    targetHeight: 1280,
    encodingType: this.camera.EncodingType.JPEG,
    saveToPhotoAlbum: (source === PictureSource.CAMERA),
    allowEdit: true
  })
  </code></pre>