【问题标题】:Ionic cordova iOS ignores targetHeight离子科尔多瓦 iOS 忽略 targetHeight
【发布时间】:2020-03-08 10:18:22
【问题描述】:

我在 iPhone (iOS) 上使用带有 Ionic 的 Cordova 相机插件。我尝试通过添加 targetHeight 选项来限制存储的图像大小。通过将最大高度设置为 targetHeight 选项,这适用于 Android。在 iOS 上,此选项被忽略,我得到一个未更改的大图像。

CameraOptions = {
  quality: 50,
  destinationType: this.camera.DestinationType.DATA_URL,
  encodingType: this.camera.EncodingType.JPEG,
  mediaType: this.camera.MediaType.PICTURE,
  targetHeight: 1080,
  correctOrientation: true,
};

在此先感谢您提供任何帮助。

【问题讨论】:

    标签: typescript cordova ionic3 cordova-plugin-camera


    【解决方案1】:

    问题在于插件需要 targetHeight 和 targetWidth。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-22
      • 1970-01-01
      • 1970-01-01
      • 2019-06-03
      • 1970-01-01
      相关资源
      最近更新 更多