BitmapDecoder .GetPixelDataAsync(params)改变捕获图像的方向

时间:2016-06-28 15:25:27

标签: windows-phone-8.1 uwp windows-10-universal windows-10-mobile uwp-xaml

我正在使用UWP应用程序并在图像控件中显示相机拍摄的图像(人像)时遇到问题。如果我使用的是parmaterized版本

  ...
  store.dispatch(actions.fetch(state.list.selected))
    .then(response => {
       cb(null, Default)
    });
  ...

结果是在逆时针方向上90度方向变化的图像。 //问题 oriented image面向normal正常

但默认 decoder.GetPixelDataAsync( BitmapPixelFormat.Bgra8, // WriteableBitmap uses BGRA format BitmapAlphaMode.Ignore, transform, ExifOrientationMode.IgnoreExifOrientation, // This sample ignores Exif orientation ColorManagementMode.DoNotColorManage); 工作正常。

问题在于我无法使用默认版本的GetPixelDataSync(),因为我需要使用BitmapTransformation缩放图像。

请帮忙。

完整代码:

decoder.GetPixelDataAsync();

0 个答案:

没有答案