如何在windows phone store app 8.1 camera(MediaCapture)预览尺寸(全屏)上调整ZXing?

时间:2014-05-05 12:16:48

标签: windows-runtime zxing

我的项目在这里:(https://github.com/79144876/ZXingStoreApp) 我在我的windows phone 8.1项目中添加了zxing。这里的Zxing库:(https://zxingnet.codeplex.com/SourceControl/latest#trunk/Clients/WindowsRTDemo/MainPage.xaml.cs) 但是预览尺寸并不是全屏。所以,谁知道如何更改预览尺寸? 我有SetResolution,但仍然没有全屏。 感谢。

1 个答案:

答案 0 :(得分:3)

在我的代码中,我这样做

_capture.SetPreviewRotation(VideoRotation.Clockwise90Degrees);
_capture.SetPreviewMirroring(true);
CaptureView.Source = _capture;
CaptureView.Stretch = Stretch.UniformToFill;

在您的情况下,将CaptureView替换为VideoCapture

但是现在zxing对于通用应用程序的工作非常糟糕。 MediaCapture不是从相机获取数据的好选择:(