【发布时间】:2016-05-10 16:51:45
【问题描述】:
有没有办法将Cordova camera plugin 配置为返回没有超出目标高度的黑带的照片?
这样设置选项时返回:
var options = {
quality: 100,
destinationType: Camera.DestinationType.FILE_URI,
sourceType: Camera.PictureSourceType.CAMERA,
allowEdit: true,
encodingType: Camera.EncodingType.JPEG,
targetWidth: 800,
targetHeight: 1200,
popoverOptions: CameraPopoverOptions,
saveToPhotoAlbum: false,
correctOrientation: true
};
$cordovaCamera.getPicture(options).then(function (imageURI) {});
我已尝试删除 targetWidth 和 targHeight 参数。您无法提前知道照片是横向还是纵向的一个问题。
这是一个一年前从未回答过的问题:Phonegap Camera returns photo with black bars
【问题讨论】:
-
它发生在 iOS 中吗?据我分析,在 iOS 中,很多人都遇到过类似的问题,因为没有设置启动屏幕。看看这个链接 - stackoverflow.com/questions/32641240/…
-
与该链接的主题无关,抱歉。
-
您能在此处或在 gtihub 中发布您的完整代码,以便我们模拟问题吗?
-
@metalaureate 检查您的移动设备相机选项,您必须为这种类型的视图选择一些东西。调用相机后,转到设备中的每个选项
标签: android ios cordova ionic-framework cordova-plugins