2014-11-05 46 views
0

问题: 我以90度逆时针旋转1次风景图像1次。重建图像后,它看起来并没有看到它在逆时针位置旋转了1次。它提供顺时针90度的图像。如何在逆时针旋转后重建图像

我用下面的代码:

 
var encoder = await BitmapEncoder.CreateAsync(BitmapEncoder.PngEncoderId, fileStream); 

    encoder.SetPixelData(
    BitmapPixelFormat.Bgra8, 
    BitmapAlphaMode.Ignore, 
    (uint)renderTargetBitmap.PixelWidth, 
    (uint)renderTargetBitmap.PixelHeight, 
    DisplayInformation.GetForCurrentView().LogicalDpi, 
    DisplayInformation.GetForCurrentView().LogicalDpi, 
    pixelBuffer.ToArray()); 

    encoder.BitmapTransform.Rotation = BitmapRotation.Clockwise90Degrees; 

    await encoder.FlushAsync(); 

There is no AntiClockwise90Degrees in BitmapRotation 

如何解决这个问题呢?

回答

0

BitmapRotation.Clockwise90Degrees将顺时针旋转90°。 BitmapRotation.Clockwise270Degrees将逆时针旋转90°(360° - 90°= 270°)

相关问题